2018-02-12 03:45:56 +08:00
|
|
|
project(spdlog-utests CXX)
|
2018-08-15 03:33:47 +08:00
|
|
|
|
2018-02-12 03:45:56 +08:00
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
|
|
|
set(SPDLOG_UTESTS_SOURCES
|
2018-11-20 18:14:21 +08:00
|
|
|
test_errors.cpp
|
2018-11-22 18:31:16 +08:00
|
|
|
test_file_helper.cpp
|
2018-11-20 18:14:21 +08:00
|
|
|
test_file_logging.cpp
|
2018-02-23 22:49:26 +08:00
|
|
|
test_misc.cpp
|
2018-08-15 03:33:47 +08:00
|
|
|
test_pattern_formatter.cpp
|
2018-05-23 02:59:27 +08:00
|
|
|
test_async.cpp
|
2018-02-12 03:45:56 +08:00
|
|
|
includes.h
|
2018-10-14 00:23:11 +08:00
|
|
|
test_registry.cpp
|
2018-02-12 03:45:56 +08:00
|
|
|
test_macros.cpp
|
|
|
|
utils.cpp
|
|
|
|
utils.h
|
2018-08-15 03:33:47 +08:00
|
|
|
main.cpp
|
|
|
|
test_mpmc_q.cpp
|
|
|
|
test_sink.h
|
2018-09-28 06:30:29 +08:00
|
|
|
test_fmt_helper.cpp)
|
2018-02-12 03:45:56 +08:00
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} ${SPDLOG_UTESTS_SOURCES})
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
2019-05-18 12:09:22 +08:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
|
2018-02-12 03:45:56 +08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
2018-08-15 03:33:47 +08:00
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|