diff options
author | 2018-12-27 09:16:20 +0800 | |
---|---|---|
committer | 2018-12-28 12:17:06 +0900 | |
commit | 46e63a2a3ed46ce97430ce38e4cc0798c57900eb (patch) | |
tree | 92e2d546c281fcb4694bad7ae7ac876251486529 | |
parent | core: support %j in unit dependency resolution (diff) | |
download | systemd-46e63a2a3ed46ce97430ce38e4cc0798c57900eb.tar.gz systemd-46e63a2a3ed46ce97430ce38e4cc0798c57900eb.tar.bz2 systemd-46e63a2a3ed46ce97430ce38e4cc0798c57900eb.zip |
meson: use cross compilation compatible c++ check
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/systemd/meson.build | 3 | ||||
-rw-r--r-- | src/test/meson.build | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/meson.build b/meson.build index b338886c3..1964b1aa8 100644 --- a/meson.build +++ b/meson.build @@ -287,10 +287,8 @@ want_tests = get_option('tests') slow_tests = want_tests != 'false' and get_option('slow-tests') install_tests = get_option('install-tests') -cxx = find_program('c++', required : fuzzer_build) -if cxx.found() +if add_languages('cpp', required : fuzzer_build) # Used only for tests - add_languages('cpp') cxx_cmd = ' '.join(meson.get_compiler('cpp').cmd_array()) else cxx_cmd = '' diff --git a/src/systemd/meson.build b/src/systemd/meson.build index e0c967efc..75c48b07a 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -52,8 +52,7 @@ if cc.has_argument('-std=iso9899:2017') opts += [['c', '-std=iso9899:2017']] endif -cxx = find_program('c++', required : false) -if cxx.found() +if add_languages('cpp', required : false) opts += [['c++'], ['c++', '-std=c++98'], ['c++', '-std=c++11']] diff --git a/src/test/meson.build b/src/test/meson.build index ea049a6fb..d9d87e02c 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -957,7 +957,7 @@ tests += [ ] -if cxx.found() +if cxx_cmd != '' tests += [ [['src/libsystemd/sd-bus/test-bus-vtable-cc.cc'], [], |