Define tomlplusplus_dep for when included in subproject. Added option BUILD_TESTS, default false.
This commit is contained in:
parent
74e7209cca
commit
865561b46c
14
meson.build
14
meson.build
@ -11,7 +11,6 @@ project(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
compiler = meson.get_compiler('cpp')
|
compiler = meson.get_compiler('cpp')
|
||||||
message(['compiler ID: ', compiler.get_id()])
|
message(['compiler ID: ', compiler.get_id()])
|
||||||
|
|
||||||
@ -73,7 +72,16 @@ compiler_supports_char8_strings = compiler.compiles('''
|
|||||||
args : [ '-std=c++2a' ]
|
args : [ '-std=c++2a' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
inc = include_directories(['include', 'extern'])
|
tomlplusplus_dep = declare_dependency(
|
||||||
|
include_directories : include_directories('include'),
|
||||||
|
version : meson.project_version(),
|
||||||
|
)
|
||||||
|
|
||||||
|
if get_option('BUILD_TESTS')
|
||||||
|
inc = include_directories('include', 'extern')
|
||||||
|
subdir('tests')
|
||||||
|
else
|
||||||
|
message('Not building tests')
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('tests')
|
|
||||||
# subdir('examples')
|
# subdir('examples')
|
||||||
|
1
meson_options.txt
Normal file
1
meson_options.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
option('BUILD_TESTS', type : 'boolean', value : false, description : 'Whether to build tests')
|
Loading…
Reference in New Issue
Block a user