mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-23 13:09:11 +00:00
meson: add tests (#1044)
This integrates the "main" test suite (test/test.cc) in Meson. This allows to run the tests in the CI with the Meson-built version of the library to ensure that nothing breaks unexpectedly. It also simplifies life of downstream packagers, that do not have to write a custom build script to split the library and run tests but can instead just let Meson do that for them.
This commit is contained in:
parent
4e05368086
commit
e3e28c6231
7 changed files with 179 additions and 5 deletions
|
@ -7,6 +7,7 @@ project(
|
|||
'cpp',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'cpp_std=c++11',
|
||||
'buildtype=release',
|
||||
'b_ndebug=if-release',
|
||||
'b_lto=true',
|
||||
|
@ -71,7 +72,7 @@ if brotli_found_all
|
|||
args += '-DCPPHTTPLIB_BROTLI_SUPPORT'
|
||||
endif
|
||||
|
||||
cpp_httplib_dep = dependency('', required : false)
|
||||
cpp_httplib_dep = dependency('', required: false)
|
||||
|
||||
if get_option('cpp-httplib_compile')
|
||||
httplib_ch = custom_target(
|
||||
|
@ -106,3 +107,7 @@ endif
|
|||
if meson.version().version_compare('>=0.54.0')
|
||||
meson.override_dependency('cpp-httplib', cpp_httplib_dep)
|
||||
endif
|
||||
|
||||
if get_option('cpp-httplib_test')
|
||||
subdir('test')
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue