From 9808646bac425d7f0abb29a8de51f6aa0f756632 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Mon, 25 Oct 2021 23:28:33 +0200 Subject: [PATCH] FIX: only add tests if tests are enabled --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6d889d..e22492d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,7 @@ target_include_directories(eventmanager-static ) target_link_libraries(eventmanager-static PUBLIC Threads::Threads) +IF(${EM_TESTS}) # # add tests as executable # @@ -80,3 +81,5 @@ catch_discover_tests(test_event) add_executable(test_basic tests/test_basic.cpp) target_link_libraries(test_basic Catch2::Catch2 eventmanager-static) catch_discover_tests(test_basic) + +ENDIF()