Skip to content

Commit ec36d05

Browse files
davide125poettering
authored andcommitted
meson: only run c++ tests when c++ compiler is available (systemd#6123)
1 parent 42d3bf8 commit ec36d05

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/systemd/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ install_headers(
4040

4141
opts = [['c'],
4242
['c', '-ansi'],
43-
['c', '-std=iso9899:1990'],
44-
['c++']]
43+
['c', '-std=iso9899:1990']]
44+
45+
cxx = find_program('c++', required : false)
46+
if cxx.found()
47+
opts += [['c++']]
48+
endif
4549

4650
foreach header : _systemd_headers
4751
foreach opt : opts

0 commit comments

Comments
 (0)