From: Davide Cavalca Date: Thu, 15 Jun 2017 08:55:13 +0000 (+0100) Subject: meson: only run c++ tests when c++ compiler is available (#6123) X-Git-Tag: v234~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec36d052f71888333aaae4ee47f7d1cd2c3c6c0d;p=thirdparty%2Fsystemd.git meson: only run c++ tests when c++ compiler is available (#6123) --- diff --git a/src/systemd/meson.build b/src/systemd/meson.build index 75435acb147..debbd46dff5 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -40,8 +40,12 @@ install_headers( opts = [['c'], ['c', '-ansi'], - ['c', '-std=iso9899:1990'], - ['c++']] + ['c', '-std=iso9899:1990']] + +cxx = find_program('c++', required : false) +if cxx.found() + opts += [['c++']] +endif foreach header : _systemd_headers foreach opt : opts