From: Zbigniew Jędrzejewski-Szmek Date: Tue, 9 Oct 2018 16:48:09 +0000 (+0200) Subject: meson: we cannot call get_compiler('cpp') if we didn't "add" it X-Git-Tag: v240~590 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b2acaa7a642ad9b95e97f2752ce7c86874caaa0;p=thirdparty%2Fsystemd.git meson: we cannot call get_compiler('cpp') if we didn't "add" it Follow-up for f6d783ac3d145f3f3ffc2023d4ad90f76cf7fe34. --- diff --git a/meson.build b/meson.build index e3f06616b55..51407098dc2 100644 --- a/meson.build +++ b/meson.build @@ -278,6 +278,9 @@ cxx = find_program('c++', required : false) if cxx.found() # Used only for tests add_languages('cpp') + cpp_cmd = ' '.join(meson.get_compiler('cpp').cmd_array()) +else + cpp_cmd = '' endif want_ossfuzz = get_option('oss-fuzz') diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build index b4aadaab2ec..b411e969153 100644 --- a/test/fuzz/meson.build +++ b/test/fuzz/meson.build @@ -9,7 +9,7 @@ sanitize_address = custom_target( 'fuzzers', '-Db_lundef=false -Db_sanitize=address', ' '.join(cc.cmd_array()), - ' '.join(meson.get_compiler('cpp').cmd_array())]) + cpp_cmd]) sanitizers = [['address', sanitize_address]]