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:
parent
62e3a988f2
commit
442bc2afee
|
@ -54,7 +54,7 @@ if cc.has_argument('-std=iso9899:2017')
|
||||||
opts += [['c', '-std=iso9899:2017']]
|
opts += [['c', '-std=iso9899:2017']]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if add_languages('cpp', required : false)
|
if cxx_cmd != ''
|
||||||
opts += [['c++'],
|
opts += [['c++'],
|
||||||
['c++', '-std=c++98'],
|
['c++', '-std=c++98'],
|
||||||
['c++', '-std=c++11']]
|
['c++', '-std=c++11']]
|
||||||
|
|
Loading…
Reference in a new issue