cmake: disable testing, do not build test when building all

This commit is contained in:
Tom 2019-10-13 14:53:45 +02:00
parent 7da937d750
commit 9aaa7180fc
2 changed files with 1 additions and 3 deletions

View File

@ -40,6 +40,5 @@ install(EXPORT SgnlTargets
NAMESPACE sgnl::
DESTINATION lib/cmake/sgnl)
enable_testing()
add_subdirectory("test")

View File

@ -8,11 +8,10 @@ find_package(Catch2 REQUIRED)
add_executable(
sgnl-test
EXCLUDE_FROM_ALL
"${PROJECT_SOURCE_DIR}/test.cpp")
enable_warnings(sgnl-test PRIVATE)
target_link_libraries(sgnl-test sgnl::sgnl Catch2::Catch2 "-fsanitize=thread")
target_compile_features(sgnl-test PUBLIC cxx_std_17)
target_compile_options(sgnl-test PUBLIC "-fsanitize=thread")
add_test("signal-handler-test" sgnl-test)