mirror of https://github.com/CGAL/cgal
Add CGAL_DEV_MODE
This commit is contained in:
parent
2e7c3ee5b8
commit
69ca424c5e
|
|
@ -551,7 +551,7 @@ message( "== Generate version files (DONE) ==\n")
|
|||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
message("== Set up flags ==")
|
||||
|
||||
# Ugly hack to be compatible with current CGAL testsuite process (as of
|
||||
|
|
|
|||
|
|
@ -186,7 +186,9 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
|
|||
# Temporary? Change the CMAKE module path
|
||||
cgal_setup_module_path()
|
||||
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
# Do not use -isystem for CGAL include paths
|
||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||
# Ugly hack to be compatible with current CGAL testsuite process (as of
|
||||
# Nov. 2017). -- Laurent Rineau
|
||||
include(CGAL_SetupFlags)
|
||||
|
|
|
|||
|
|
@ -158,7 +158,9 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
|
|||
# Temporary? Change the CMAKE module path
|
||||
cgal_setup_module_path()
|
||||
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
# Do not use -isystem for CGAL include paths
|
||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||
# Ugly hack to be compatible with current CGAL testsuite process (as of
|
||||
# Nov. 2017). -- Laurent Rineau
|
||||
include(CGAL_SetupFlags)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake)
|
||||
|
||||
option(CGAL_DEV_MODE "
|
||||
Activate the CGAL developers mode. \
|
||||
See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE"
|
||||
FALSE)
|
||||
|
||||
if(RUNNING_CGAL_AUTO_TEST)
|
||||
# Just to avoid a warning from CMake if that variable is set on the command line...
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -50,17 +50,13 @@ uniquely_add_flags( CMAKE_EXE_LINKER_FLAGS_DEBUG ${CGAL_EXE_LINKER_FLAGS_DE
|
|||
|
||||
# Set a default build type if none is given
|
||||
if ( NOT CMAKE_BUILD_TYPE )
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug )
|
||||
else ()
|
||||
typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
add_definitions(-DCGAL_TEST_SUITE)
|
||||
endif()
|
||||
|
||||
if ( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug"
|
||||
AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel" )
|
||||
message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release, Debug, RelWithDebInfo or MinSizeRel is allowed" )
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
set(USE_CGAL_FILE_INCLUDED 1)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake)
|
||||
if( RUNNING_CGAL_AUTO_TEST )
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake)
|
||||
else()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake)
|
||||
|
|
|
|||
Loading…
Reference in New Issue