From 1f4777a2877e1df3215e03e48204333cb160a2c6 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 3 Apr 2019 20:39:31 +0200 Subject: CMake: move enable_testing() to the top level This allows calling ctest from the main build directory instead of having to change one level down. As a bonus the unittests now show up in my KDevelop so I can directly run them from the IDE. Signed-off-by: Rolf Eike Beer --- CMakeLists.txt | 1 + tests/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 432030354..52347c458 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -530,6 +530,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() if (MAKE_TESTS) + enable_testing() add_subdirectory(tests) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 447a85033..229054631 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -73,7 +73,6 @@ function(TEST NAME FILE) endif() endfunction() -enable_testing() add_definitions(-g) add_definitions(-DSUBSURFACE_TEST_DATA="${SUBSURFACE_TEST_DATA}") -- cgit v1.2.3-70-g09d2