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.
This commit is contained in:
Luca Boccassi
2020-12-04 08:35:56 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 62e3a988f2
commit 442bc2afee
+1 -1
View File
@@ -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']]