mirror of https://github.com/CGAL/cgal
Force platform features check to be re-tested when running test-suite
Fixed syntax error in vc_debug_hook.h
This commit is contained in:
parent
a11e64b39e
commit
ca9cc615e8
|
|
@ -99,12 +99,16 @@ foreach(config_test_cpp ${all_config_tests})
|
|||
get_filename_component(config_test_name ${config_test_cpp} NAME_WE)
|
||||
|
||||
# Compile and run ${config_test_cpp}. Exit code is stored in ${config_test_name}.
|
||||
if( RUNNING_CGAL_AUTO_TEST OR "${config_test_name}" MATCHES "^${config_test_name}$" )
|
||||
|
||||
CHECK_CXX_FILE_RUNS(${config_test_cpp} ${config_test_name} ${config_test_name})
|
||||
|
||||
if ( ${config_test_name} )
|
||||
set ( ${config_test_name} 0 )
|
||||
set ( ${config_test_name} 0 CACHE INTERNAL "" FORCE )
|
||||
else()
|
||||
set ( ${config_test_name} 1 )
|
||||
set ( ${config_test_name} 1 CACHE INTERNAL "" FORCE )
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
add_config_flag( ${config_test_name} ${config_test_name} )
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
# KDE4's CheckCSourceRuns.cmake
|
||||
|
||||
MACRO(CHECK_CXX_FILE_RUNS FILE VAR TEST)
|
||||
|
||||
# Set compiler settings
|
||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
|
@ -43,12 +44,12 @@ MACRO(CHECK_CXX_FILE_RUNS FILE VAR TEST)
|
|||
|
||||
# if it did not compile make the return value fail code of 1
|
||||
if(NOT ${VAR}_COMPILED)
|
||||
SET(${VAR} 1)
|
||||
SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}" FORCE )
|
||||
endif()
|
||||
# if the return value was 0 then it worked
|
||||
SET(result_var ${${VAR}})
|
||||
if("${result_var}" EQUAL 0)
|
||||
SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}")
|
||||
SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}" FORCE )
|
||||
MESSAGE(STATUS "Performing Test ${TEST} - Success")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C++ SOURCE FILE Test ${TEST} succeded with the following output:\n"
|
||||
|
|
@ -56,7 +57,7 @@ MACRO(CHECK_CXX_FILE_RUNS FILE VAR TEST)
|
|||
"Source file was:\n${SOURCE}\n")
|
||||
else()
|
||||
MESSAGE(STATUS "Performing Test ${TEST} - Failed")
|
||||
SET(${VAR} "" CACHE INTERNAL "Test ${TEST}")
|
||||
SET(${VAR} "" CACHE INTERNAL "Test ${TEST}" FORCE )
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing C++ SOURCE FILE Test ${TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace
|
|||
{
|
||||
CGAL_DebugHook()
|
||||
{
|
||||
::_CrtSetReportHook(CGAL_report_hook);
|
||||
_CrtSetReportHook(CGAL_report_hook);
|
||||
|
||||
// This is OK for unattended runs but will prevent the IDE for trapping the signal
|
||||
std::signal(SIGSEGV,CGAL_handle_signal);
|
||||
|
|
|
|||
Loading…
Reference in New Issue