Skip to content

Commit

Permalink
Merge pull request #11119 from rouault/remove_include_ctest
Browse files Browse the repository at this point in the history
CMake: use enable_testing() instead of include(CTest)
  • Loading branch information
rouault authored Nov 4, 2024
2 parents db788bb + 35388a0 commit af82417
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include(cmake/helpers/GdalCMakeMinimumRequired.cmake)
cmake_minimum_required(VERSION ${GDAL_CMAKE_VERSION_MIN}...${GDAL_CMAKE_VERSION_MAX})

project(gdal LANGUAGES C CXX)
include(CTest)

set(GDAL_LIB_TARGET_NAME GDAL)

Expand Down Expand Up @@ -224,6 +223,10 @@ endif()
#
include(${CMAKE_CURRENT_SOURCE_DIR}/gdal.cmake)

option(BUILD_TESTING "Build the testing tree." ON)
if (BUILD_TESTING)
enable_testing()
endif()
if (BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/autotest")
# unit tests
add_subdirectory(autotest/cpp)
Expand Down

0 comments on commit af82417

Please sign in to comment.