From a67091e21bfb8df039f291c028222e3e3753299d Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 25 Oct 2024 21:16:24 +0200 Subject: [PATCH] CMake: use enable_testing() instead of include(CTest) According to Craig Scott in https://discourse.cmake.org/t/is-there-any-reason-to-prefer-include-ctest-or-enable-testing-over-the-other/1905/2 , using include(CTest) adds unnecessary clutter that is only needed for dashboard submission. enable_testing() is enough otherwise "Port" of https://github.com/OSGeo/shapelib/pull/162 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98a278631d..d748992e79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,9 +341,10 @@ set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj") ################################################################################ # Tests ################################################################################ -include(CTest) +option(BUILD_TESTING "Build the testing tree." ON) if(BUILD_TESTING) + enable_testing() include(ProjTest) else() message(STATUS "Testing disabled")