summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-12-03 16:17:43 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-12-08 17:18:36 +0100
commit4ef70ecefce071f2c2461984b347cdbafcce6f06 (patch)
treed58dd54353871b8ba024f3295841b5350b15492c
parentdc057df84c93274283cd228bc56733bc03a54195 (diff)
downloadsystemd-4ef70ecefce071f2c2461984b347cdbafcce6f06.tar.gz
meson: check that cxx variable is set before using it
In some cases it is not defined. Eg in a yocto build: src/systemd/meson.build:61:15: ERROR: Unknown variable cxx. (cherry picked from commit 442bc2afee6c5f731c7b3e76ccab7301703a45a7)
-rw-r--r--src/systemd/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemd/meson.build b/src/systemd/meson.build
index c9c484b411..3d328e5fd3 100644
--- a/src/systemd/meson.build
+++ b/src/systemd/meson.build
@@ -54,7 +54,7 @@ if cc.has_argument('-std=iso9899:2017')
opts += [['c', '-std=iso9899:2017']]
endif
-if add_languages('cpp', required : false)
+if cxx_cmd != ''
opts += [['c++'],
['c++', '-std=c++98'],
['c++', '-std=c++11']]