mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-04 08:41:39 -05:00
meson: add tests and option to disable them
This enables building the Luppp unit tests with Meson, and adds an option to disable building those tests. For a release, the option should probably be off - although currently it has no significant impact on the result. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This commit is contained in:
parent
48802f14ad
commit
f34a44e775
4 changed files with 19 additions and 3 deletions
12
meson.build
12
meson.build
|
@ -1,10 +1,16 @@
|
|||
project('openav_luppp', ['c','cpp'])
|
||||
project( 'openav_luppp', ['c','cpp'],
|
||||
default_options : [
|
||||
'cpp_std=c++11',
|
||||
])
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set('version', '1.1.1')
|
||||
|
||||
#add_project_arguments('-std=c99', language : 'c')
|
||||
#add_project_arguments('-std=c++11', language : 'cpp')
|
||||
|
||||
if(get_option('tests') == true)
|
||||
add_project_arguments('-DBUILD_TESTS', language : 'cpp')
|
||||
endif
|
||||
|
||||
add_project_arguments('-Wno-unused-variable', language : 'cpp')
|
||||
add_project_arguments('-Wno-reorder', language : 'cpp')
|
||||
add_project_arguments('-Wno-sign-compare', language : 'cpp')
|
||||
|
|
1
meson_options.txt
Normal file
1
meson_options.txt
Normal file
|
@ -0,0 +1 @@
|
|||
option('tests', type : 'boolean', value : true, description : 'Build tests')
|
|
@ -30,3 +30,7 @@ subdir('controller')
|
|||
subdir('observer')
|
||||
subdir('state')
|
||||
subdir('avtk')
|
||||
|
||||
if(get_option('tests') == true)
|
||||
subdir('tests')
|
||||
endif
|
||||
|
|
5
src/tests/meson.build
Normal file
5
src/tests/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
|||
luppp_src += files(
|
||||
'diskreadertest.cxx',
|
||||
'diskwritertest.cxx',
|
||||
'goptionstest.cxx',
|
||||
'gridlogictests.cxx')
|
Loading…
Add table
Reference in a new issue