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 <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-04-03 20:39:31 +02:00 committed by Dirk Hohndel
parent cf86ece73e
commit 1f4777a287
2 changed files with 1 additions and 1 deletions

View file

@ -530,6 +530,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if (MAKE_TESTS)
enable_testing()
add_subdirectory(tests)
endif()

View file

@ -73,7 +73,6 @@ function(TEST NAME FILE)
endif()
endfunction()
enable_testing()
add_definitions(-g)
add_definitions(-DSUBSURFACE_TEST_DATA="${SUBSURFACE_TEST_DATA}")