Skip to content

Commit

Permalink
CMake: use enable_testing() instead of include(CTest)
Browse files Browse the repository at this point in the history
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 OSGeo/shapelib#162
  • Loading branch information
rouault committed Oct 25, 2024
1 parent 01194d8 commit a67091e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a67091e

Please sign in to comment.