FIX: only add tests if tests are enabled

This commit is contained in:
Dominik Meyer 2021-10-25 23:28:33 +02:00
parent a0d174df08
commit 9808646bac
No known key found for this signature in database
GPG Key ID: B4C312B600606B64

View File

@ -70,6 +70,7 @@ target_include_directories(eventmanager-static
) )
target_link_libraries(eventmanager-static PUBLIC Threads::Threads) target_link_libraries(eventmanager-static PUBLIC Threads::Threads)
IF(${EM_TESTS})
# #
# add tests as executable # add tests as executable
# #
@ -80,3 +81,5 @@ catch_discover_tests(test_event)
add_executable(test_basic tests/test_basic.cpp) add_executable(test_basic tests/test_basic.cpp)
target_link_libraries(test_basic Catch2::Catch2 eventmanager-static) target_link_libraries(test_basic Catch2::Catch2 eventmanager-static)
catch_discover_tests(test_basic) catch_discover_tests(test_basic)
ENDIF()