Fix autotest_cgal_with_ctest

That commit makes the CMake variables `CGAL_TEST_SUITE` (the new one)
and `RUNNING_CGAL_AUTO_TEST` (the legacy one) completely equivalent.
This commit is contained in:
Laurent Rineau 2022-10-05 15:01:56 +02:00
parent 207a1e896b
commit ea35fa8f88
11 changed files with 17 additions and 17 deletions

View File

@ -354,7 +354,7 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake)
cgal_setup_module_path() cgal_setup_module_path()
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
message(STATUS "Operating system:") message(STATUS "Operating system:")
execute_process( execute_process(
COMMAND uname -a COMMAND uname -a
@ -394,7 +394,7 @@ if(MSVC)
)# Suppress warnings C4503 about "decorated name length exceeded" )# Suppress warnings C4503 about "decorated name length exceeded"
uniquely_add_flags(CGAL_CXX_FLAGS "/bigobj") # Use /bigobj by default uniquely_add_flags(CGAL_CXX_FLAGS "/bigobj") # Use /bigobj by default
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
set(CMAKE_CXX_WARNING_LEVEL set(CMAKE_CXX_WARNING_LEVEL
2 2
CACHE STRING "MSVC C++ compiler warning level" FORCE) CACHE STRING "MSVC C++ compiler warning level" FORCE)
@ -447,7 +447,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(GCC_FOUND) if(GCC_FOUND)
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
uniquely_add_flags(CGAL_CXX_FLAGS "-Wall") uniquely_add_flags(CGAL_CXX_FLAGS "-Wall")
# Remove -g from the relevant CMAKE_CXX_FLAGS. This will also # Remove -g from the relevant CMAKE_CXX_FLAGS. This will also
# propagate to the rest of the tests, since we overwrite those # propagate to the rest of the tests, since we overwrite those
@ -484,7 +484,7 @@ message("== Generate version files (DONE) ==\n")
# #
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST) if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
message("== Set up flags ==") message("== Set up flags ==")
# Ugly hack to be compatible with current CGAL testsuite process (as of # Ugly hack to be compatible with current CGAL testsuite process (as of
@ -842,7 +842,7 @@ endmacro()
# This allows programs to locate CGALConfig.cmake # This allows programs to locate CGALConfig.cmake
set(CGAL_DIR ${CGAL_BINARY_DIR}) set(CGAL_DIR ${CGAL_BINARY_DIR})
if(NOT RUNNING_CGAL_AUTO_TEST) if(NOT RUNNING_CGAL_AUTO_TEST AND NOT CGAL_TEST_SUITE)
add_programs(examples examples OFF) add_programs(examples examples OFF)
add_programs(demo demos OFF) add_programs(demo demos OFF)
@ -1258,4 +1258,4 @@ if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
if(Qt5_FOUND) if(Qt5_FOUND)
message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'")
endif()#Qt5_FOUND endif()#Qt5_FOUND
endif()#RUNNING_CGAL_AUTO_TEST endif()#RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE

View File

@ -4,7 +4,7 @@ option(CGAL_DEV_MODE
"Activate the CGAL developers mode. See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" "Activate the CGAL developers mode. See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE"
$ENV{CGAL_DEV_MODE}) $ENV{CGAL_DEV_MODE})
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
# Just to avoid a warning from CMake if that variable is set on the command line... # Just to avoid a warning from CMake if that variable is set on the command line...
endif() endif()

View File

@ -152,7 +152,7 @@ function(CGAL_setup_CGAL_dependencies target)
"-features=extensions;-library=stlport4;-D_GNU_SOURCE") "-features=extensions;-library=stlport4;-D_GNU_SOURCE")
target_link_libraries(${target} INTERFACE "-library=stlport4") target_link_libraries(${target} INTERFACE "-library=stlport4")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if ( RUNNING_CGAL_AUTO_TEST ) if ( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE )
target_compile_options(${target} INTERFACE "-Wall") target_compile_options(${target} INTERFACE "-Wall")
endif() endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3)

View File

@ -46,7 +46,7 @@ uniquely_add_flags( CMAKE_EXE_LINKER_FLAGS_DEBUG ${CGAL_EXE_LINKER_FLAGS_DE
# Set a default build type if none is given # Set a default build type if none is given
if ( NOT CMAKE_BUILD_TYPE ) if ( NOT CMAKE_BUILD_TYPE )
if( RUNNING_CGAL_AUTO_TEST ) if( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE )
typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug )
else () else ()
typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release )

View File

@ -90,7 +90,7 @@ function(CGAL_run_at_the_end_of_configuration variable access value current_list
if(DEFINED CMAKE_BUILD_TYPE AND ( NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "Debug") ) if(DEFINED CMAKE_BUILD_TYPE AND ( NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "Debug") )
set(keyword WARNING) set(keyword WARNING)
set(type warning) set(type warning)
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
# No warning in the CMake test suite, but a status message # No warning in the CMake test suite, but a status message
set(keyword) set(keyword)
set(type notice) set(type notice)

View File

@ -13,7 +13,7 @@ if(NOT USE_CGAL_FILE_INCLUDED)
set(USE_CGAL_FILE_INCLUDED 1) set(USE_CGAL_FILE_INCLUDED 1)
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake)
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE )
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake)
else() else()
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake)

View File

@ -89,7 +89,7 @@ if (NOT CGAL_DATA_DIR)
if (EXISTS "${CMAKE_SOURCE_DIR}/../../data") if (EXISTS "${CMAKE_SOURCE_DIR}/../../data")
set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/../../data") set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/../../data")
else() else()
if(CGAL_TEST_SUITE) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
message(WARNING "CGAL_DATA_DIR cannot be deduced, set the variable CGAL_DATA_DIR to set the default value of CGAL::data_file_path()") message(WARNING "CGAL_DATA_DIR cannot be deduced, set the variable CGAL_DATA_DIR to set the default value of CGAL::data_file_path()")
endif() endif()
endif() endif()
@ -195,7 +195,7 @@ cgal_setup_module_path()
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake)
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE )
# Do not use -isystem for CGAL include paths # Do not use -isystem for CGAL include paths
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
endif() endif()

View File

@ -17,7 +17,7 @@ find_package(
COMPONENTS OpenGL Script Svg COMPONENTS OpenGL Script Svg
OPTIONAL_COMPONENTS ScriptTools WebSockets) OPTIONAL_COMPONENTS ScriptTools WebSockets)
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
if(Qt5_FOUND) if(Qt5_FOUND)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
endif() endif()

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.1...3.22) cmake_minimum_required(VERSION 3.1...3.22)
project(Set_movable_separability_2_Tests) project(Set_movable_separability_2_Tests)
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
# Just to avoid a warning from CMake when that variable is set on the command line... # Just to avoid a warning from CMake when that variable is set on the command line...
endif() endif()
if(CGAL_DIR) if(CGAL_DIR)

View File

@ -11,7 +11,7 @@ if(CGAL_ImageIO_FOUND)
create_single_source_cgal_program("mesh_an_implicit_function.cpp") create_single_source_cgal_program("mesh_an_implicit_function.cpp")
else() else()
if(RUNNING_CGAL_AUTO_TEST) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
# Just to avoid a warning from CMake if that variable is set on the command line... # Just to avoid a warning from CMake if that variable is set on the command line...
endif() endif()

View File

@ -392,7 +392,7 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro
\section example Examples \section example Examples
All the examples are de-activated in the cmake list outside of our testsuite. To tesr them, one must add `-DRUNNING_CGAL_AUTO_TEST=ON` to the cmake call. All the examples are de-activated in the cmake list outside of our testsuite. To test them, one must add `-DCGAL_TEST_SUITE=ON` to the cmake call.
\subsection example1 Creating a Basic Plugin \subsection example1 Creating a Basic Plugin
\cgalExample{Three_examples/Basic_plugin.cpp} \cgalExample{Three_examples/Basic_plugin.cpp}