From: Wolfgang Bangerth Date: Tue, 18 Aug 2015 20:17:40 +0000 (-0500) Subject: Provide a cached variable for the detection of FP exceptions. X-Git-Tag: v8.4.0-rc2~587^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F965%2Fhead;p=dealii.git Provide a cached variable for the detection of FP exceptions. This way people can switch off the whole mechanism if the want. --- diff --git a/cmake/checks/check_02_system_features.cmake b/cmake/checks/check_02_system_features.cmake index 33aaccc9f0..7f481b7e45 100644 --- a/cmake/checks/check_02_system_features.cmake +++ b/cmake/checks/check_02_system_features.cmake @@ -95,11 +95,17 @@ CHECK_CXX_SOURCE_RUNS(" " _HAVE_FP_EXCEPTIONS) -IF(_HAVE_FP_EXCEPTIONS) - MESSAGE(STATUS "Checking for Floating Point Exception macros -- Success") - SET(DEAL_II_HAVE_FP_EXCEPTIONS 1) -ELSE() - MESSAGE(STATUS "Checking for Floating Point Exception macros -- Failed") + +SET(DEAL_II_HAVE_FP_EXCEPTIONS ON CACHE BOOL "If ON, floating point exception are raised in debug mode when running the testsuite.") + +IF (DEAL_II_HAVE_FP_EXCEPTIONS) + IF(_HAVE_FP_EXCEPTIONS) + MESSAGE(STATUS "Checking for Floating Point Exception macros -- Success") + # nothing to set here -- DEAL_II_HAVE_FP_EXCEPTIONS is already ON + ELSE() + MESSAGE(STATUS "Checking for Floating Point Exception macros -- Failed") + SET(DEAL_II_HAVE_FP_EXCEPTIONS OFF CACHE BOOL "" FORCE) + ENDIF() ENDIF()