meson: Fix tests when building with Meson (#326)

This commit is contained in:
Matthias Klumpp
2026-02-22 16:01:42 +01:00
committed by GitHub
parent 88e1113158
commit 1aed35da7d

View File

@@ -49,17 +49,21 @@ run_command(
if get_option('build_tests')
test_flags = ['-D__TEST_DIR__=' + meson.project_source_root() / 'test']
inja_test = executable(
'inja_test',
'test/test.cpp',
dependencies: inja_dep
dependencies: inja_dep,
cpp_args: test_flags,
)
inja_single_test = executable(
'inja_single_test',
'test/test.cpp',
'single_include/inja/inja.hpp',
dependencies: [inja_dep]
dependencies: [inja_dep],
cpp_args: test_flags,
)
test('Inja unit test', inja_test)
@@ -69,6 +73,7 @@ if get_option('build_tests')
inja_benchmark = executable(
'inja_benchmark',
'test/benchmark.cpp',
dependencies: inja_dep
dependencies: inja_dep,
cpp_args: test_flags,
)
endif