spdlog/tests/CMakeLists.txt

20 lines
486 B
CMake
Raw Normal View History

2016-06-17 13:55:05 +08:00
#
# Tests
#
enable_testing()
2016-06-18 20:25:43 +08:00
find_package(Threads)
2016-06-17 13:55:05 +08:00
# Build Catch unit tests
add_library(catch INTERFACE)
target_include_directories(catch INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB catch_tests LIST_DIRECTORIES false RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
2016-06-17 13:55:05 +08:00
add_executable(catch_tests ${catch_tests})
2016-06-18 20:25:43 +08:00
target_link_libraries(catch_tests spdlog ${CMAKE_THREAD_LIBS_INIT})
2016-06-17 13:55:05 +08:00
add_test(NAME catch_tests COMMAND catch_tests)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")