Commit 436ce16e authored by gabime's avatar gabime

Updated meson tests build

parent 58320e26
...@@ -147,7 +147,7 @@ endif ...@@ -147,7 +147,7 @@ endif
# --- Conditionally add subdirs --- # --- Conditionally add subdirs ---
# ------------------------------------- # -------------------------------------
if get_option('enable_tests') if get_option('enable_tests') or get_option('enable_tests-ho')
subdir('tests') subdir('tests')
endif endif
......
...@@ -2,6 +2,7 @@ option('external_fmt', type: 'boolean', value: false, description: 'Use ext ...@@ -2,6 +2,7 @@ option('external_fmt', type: 'boolean', value: false, description: 'Use ext
option('enable_examples', type: 'boolean', value: true, description: 'Build examples') option('enable_examples', type: 'boolean', value: true, description: 'Build examples')
option('enable_benchmarks', type: 'boolean', value: false, description: 'Build benchmarks') option('enable_benchmarks', type: 'boolean', value: false, description: 'Build benchmarks')
option('enable_tests', type: 'boolean', value: true, description: 'Build tests') option('enable_tests', type: 'boolean', value: true, description: 'Build tests')
option('enable_tests_ho', type: 'boolean', value: false, description: 'Build header-only tests')
option('library_type', type: 'combo', choices: ['static', 'shared'], value: 'static', description: 'Library build type') option('library_type', type: 'combo', choices: ['static', 'shared'], value: 'static', description: 'Library build type')
option('no_exceptions', type: 'boolean', value: false, description: 'Disabled exceptions - abort() instead any error') option('no_exceptions', type: 'boolean', value: false, description: 'Disabled exceptions - abort() instead any error')
......
...@@ -37,8 +37,12 @@ endif ...@@ -37,8 +37,12 @@ endif
# -------------------------------------- # --------------------------------------
# --- Build the test executables --- # --- Build the test executables ---
# -------------------------------------- # --------------------------------------
test_exe = executable('spdlog-utests', test_sources, dependencies: global_test_deps + [spdlog_dep]) if get_option('enable_tests')
test('test_spdlog', test_exe, is_parallel : false) test_exe = executable('spdlog-utests', test_sources, dependencies: global_test_deps + [spdlog_dep])
test('test_spdlog', test_exe, is_parallel : false)
endif
test_exe = executable('spdlog-utests-ho', test_sources, dependencies: global_test_deps + [spdlog_headeronly_dep]) if get_option('enable_tests_ho')
test('test_spdlog-ho', test_exe, is_parallel : false) test_exe = executable('spdlog-utests-ho', test_sources, dependencies: global_test_deps + [spdlog_headeronly_dep])
\ No newline at end of file test('test_spdlog-ho', test_exe, is_parallel : false)
endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment