CGAL_ENABLE_TESTING has three definitions

`CGAL_ENABLE_TESTING` is defined three times:
- once in `/CMakeLists.txt` that is the root of the CMake tree for a Git layout
- once in `Installation/CMakeLists.txt` that is the root of the CMake
  for a release tarball,
- and once in `CGAL_add_test.cmake`, for consumers of `CGALConfig.cmake`.

Two changes:
- Add the default value `${BUILD_TESTING}` to all three definitions
- Modify the comment
This commit is contained in:
Laurent Rineau 2023-11-10 13:17:46 +01:00
parent d6638db44f
commit a8b8102567
3 changed files with 14 additions and 6 deletions

View File

@ -46,9 +46,10 @@ option(
message("== CMake setup (DONE) ==\n")
# Enable testing with CGAL_ENABLE_TESTING. Historically, users would enable the tests
# by specifying BUILD_TESTING so if CGAL_ENABLE_TESTING is not enabled, we will set it
# to the value of BUILD_TESTING
# Enable testing with CGAL_ENABLE_TESTING. Before CGAL-6.0, users would enable
# the tests by specifying BUILD_TESTING. For compatibility, If BUILD_TESTING is
# set, that is the default value for CGAL_ENABLE_TESTING. Otherwise, the default
# value is OFF.
option(CGAL_ENABLE_TESTING "Build the testing tree." ${BUILD_TESTING})
if(CGAL_ENABLE_TESTING AND NOT POLICY CMP0064)
message(

View File

@ -105,8 +105,11 @@ else(CGAL_BRANCH_BUILD)
"${CGAL_SOURCE_DIR}"
CACHE INTERNAL "Directory containing the GraphicsView package")
# Enable testing with CGAL_ENABLE_TESTING
option(CGAL_ENABLE_TESTING "Build the testing tree." OFF)
# Enable testing with CGAL_ENABLE_TESTING. Before CGAL-6.0, users would enable
# the tests by specifying BUILD_TESTING. For compatibility, If BUILD_TESTING is
# set, that is the default value for CGAL_ENABLE_TESTING. Otherwise, the default
# value is OFF.
option(CGAL_ENABLE_TESTING "Build the testing tree." ${BUILD_TESTING})
if(CGAL_ENABLE_TESTING)
enable_testing()
endif()

View File

@ -3,7 +3,11 @@ if(CGAL_add_test_included)
endif(CGAL_add_test_included)
set(CGAL_add_test_included TRUE)
option(CGAL_ENABLE_TESTING "Build the testing tree." OFF)
# Enable testing with CGAL_ENABLE_TESTING. Before CGAL-6.0, users would enable
# the tests by specifying BUILD_TESTING. For compatibility, If BUILD_TESTING is
# set, that is the default value for CGAL_ENABLE_TESTING. Otherwise, the default
# value is OFF.
option(CGAL_ENABLE_TESTING "Build the testing tree." ${BUILD_TESTING})
if(CGAL_ENABLE_TESTING)
enable_testing()