2018-01-28 07:24:14 +08:00
|
|
|
project(spdlog-utests)
|
2016-07-08 22:50:13 +08:00
|
|
|
|
|
|
|
enable_testing()
|
2018-01-28 07:24:14 +08:00
|
|
|
find_package(Threads REQUIRED)
|
2016-07-08 22:50:13 +08:00
|
|
|
|
2018-01-28 07:24:14 +08:00
|
|
|
set(SPDLOG_UTESTS_SOURCES
|
|
|
|
errors.cpp
|
|
|
|
file_helper.cpp
|
|
|
|
file_log.cpp
|
|
|
|
format.cpp
|
|
|
|
includes.h
|
|
|
|
registry.cpp
|
|
|
|
test_macros.cpp
|
|
|
|
utils.cpp
|
|
|
|
utils.h
|
|
|
|
main.cpp)
|
2016-07-08 22:50:13 +08:00
|
|
|
|
2018-01-28 07:24:14 +08:00
|
|
|
add_executable(${PROJECT_NAME} ${SPDLOG_UTESTS_SOURCES})
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog)
|
2016-07-08 22:50:13 +08:00
|
|
|
|
2018-01-28 07:24:14 +08:00
|
|
|
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
2016-07-08 22:50:13 +08:00
|
|
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|