spdlog/tests/meson.build

48 lines
1.4 KiB
Meson
Raw Normal View History

2019-06-30 22:27:28 +08:00
test_sources = files([
2019-11-05 05:29:05 +08:00
'test_file_helper.cpp',
'test_file_logging.cpp',
'test_daily_logger.cpp',
'test_misc.cpp',
'test_pattern_formatter.cpp',
'test_async.cpp',
'test_registry.cpp',
'test_macros.cpp',
'utils.cpp',
'main.cpp',
'test_mpmc_q.cpp',
'test_dup_filter.cpp',
'test_fmt_helper.cpp',
'test_stdout_api.cpp',
'test_backtrace.cpp',
'test_create_dir.cpp'
2019-06-30 22:27:28 +08:00
])
2019-09-18 20:01:23 +08:00
if not get_option('no_exceptions')
test_sources += 'test_errors.cpp'
endif
2019-06-30 22:27:28 +08:00
global_test_deps = []
# -----------------------------------------------------
# --- Add the systemd test if libsystemd is found ---
# -----------------------------------------------------
systemd_dep = dependency('libsystemd', required: false)
if systemd_dep.found()
2019-09-18 20:01:23 +08:00
test_sources += 'test_systemd.cpp'
2019-06-30 22:27:28 +08:00
global_test_deps += systemd_dep
endif
# --------------------------------------
# --- Build the test executables ---
# --------------------------------------
2019-11-05 06:31:36 +08:00
if get_option('enable_tests')
test_exe = executable('spdlog-utests', test_sources, dependencies: global_test_deps + [spdlog_dep])
test('test_spdlog', test_exe, is_parallel : false)
endif
2019-06-30 22:27:28 +08:00
2019-11-05 06:31:36 +08:00
if get_option('enable_tests_ho')
test_exe = executable('spdlog-utests-ho', test_sources, dependencies: global_test_deps + [spdlog_headeronly_dep])
test('test_spdlog-ho', test_exe, is_parallel : false)
endif