Skip to content

Commit

Permalink
meson.build: enable CPP include check only in case CPP compiler is av…
Browse files Browse the repository at this point in the history
…ailable

Drop hard meson C++/CPP dependency, only needed for the build-time
header inclusion test, build the test only in case C++/CPP compiler
is available.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
pseiderer authored and whot committed Jan 15, 2019
1 parent fc029e3 commit 4516ba9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('libinput', 'c', 'cpp',
project('libinput', 'c',
version : '1.12.3',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
Expand Down Expand Up @@ -651,12 +651,14 @@ executable('test-build-linker',
include_directories : [includes_src, includes_include],
dependencies : [ dep_libinput, dep_libinput_util ],
install : false)
# test including from C++
executable('test-build-cxx',
'test/build-cxx.cc',
dependencies : [dep_udev],
include_directories : [includes_src, includes_include],
install : false)
# test including from C++ (in case CPP compiler is available)
if add_languages('cpp', required: false)
executable('test-build-cxx',
'test/build-cxx.cc',
dependencies : [dep_udev],
include_directories : [includes_src, includes_include],
install : false)
endif

# This is the test suite runner, we allow disabling that one because of
# dependencies
Expand Down

0 comments on commit 4516ba9

Please sign in to comment.