spdlog/tests/meson.build

51 lines
1.2 KiB
Meson
Raw Normal View History

2019-06-30 22:27:28 +08:00
test_sources = files([
2019-09-18 20:01:23 +08:00
'test_file_helper.cpp',
'test_file_logging.cpp',
'test_daily_logger.cpp',
'test_misc.cpp',
'test_pattern_formatter.cpp',
'test_async.cpp',
'includes.h',
'test_registry.cpp',
'test_macros.cpp',
'utils.cpp',
'main.cpp',
'test_mpmc_q.cpp',
'test_fmt_helper.cpp',
'test_stdout_api.cpp',
'test_dup_filter.cpp',
'test_backtrace.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 ---
# --------------------------------------
test_matrix = [
2019-09-18 20:01:23 +08:00
['spdlog-utests', spdlog_dep],
['spdlog-utests-ho', spdlog_headeronly_dep],
2019-06-30 22:27:28 +08:00
]
foreach i : test_matrix
test_exe = executable(i[0], test_sources, dependencies: global_test_deps + [i[1]])
test('test_' + i[0], test_exe)
endforeach