mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
fixed tests cmake thread flag
This commit is contained in:
parent
43511559a8
commit
8d1570b84a
@ -4,21 +4,16 @@
|
||||
|
||||
enable_testing()
|
||||
|
||||
find_package(Threads)
|
||||
|
||||
# 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)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set ( CMAKE_CXX_FLAGS "--std=c++11 -pthread")
|
||||
set ( CMAKE_EXE_LIKKER_FLAGS "-pthread")
|
||||
endif ()
|
||||
|
||||
add_executable(catch_tests ${catch_tests})
|
||||
target_link_libraries(catch_tests spdlog)
|
||||
target_link_libraries(catch_tests spdlog ${CMAKE_THREAD_LIBS_INIT})
|
||||
add_test(NAME catch_tests COMMAND catch_tests)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user