From ec36d052f71888333aaae4ee47f7d1cd2c3c6c0d Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Thu, 15 Jun 2017 09:55:13 +0100 Subject: [PATCH] meson: only run c++ tests when c++ compiler is available (#6123) --- src/systemd/meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.47.3