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-16 14:26:32 +0100
commit61bb861036d85d444cb5d372f0af7c8df671f31f (patch)
treef84e9239a91c8bcb8ee3fde6095b38a00f678b22
parent4fe8b17c974234a80c0dd3815c74ffe17ef64e05 (diff)
downloadsystemd-61bb861036d85d444cb5d372f0af7c8df671f31f.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) (cherry picked from commit dad90a476e667b9c570cf236c90b50ccae7e8817)
-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 deecdcd0fd..5f4934d138 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']]