diff --git a/CMakeLists.txt b/CMakeLists.txt index 115ab41e..aa950719 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,6 +220,9 @@ endforeach(F) if (TESTS) set(PIP_ROOT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") + if (TESTS_RUN) + enable_testing() + endif() add_subdirectory(tests) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4a1a80ef..83a65abb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,8 +16,6 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(BUILD_GMOCK OFF CACHE BOOL "Build Google Mock" FORCE) FetchContent_MakeAvailable(googletest) -enable_testing() - include(GoogleTest) macro(pip_test NAME)