# DEAL_II_HAVE_GETHOSTNAME
# DEAL_II_HAVE_GETPID
# DEAL_II_HAVE_JN
+# DEAL_II_HAVE_FP_EXCEPTIONS
# DEAL_II_HAVE_SYS_RESOURCE_H
# DEAL_II_HAVE_SYS_TIME_H
# DEAL_II_HAVE_SYS_TIMES_H
ENDIF()
+#
+# Check that we can use feenableexcept. Sets DEAL_II_HAVE_FP_EXCEPTIONS
+#
+# The test is a bit more complicated because we also check that no garbage
+# exception is thrown if we convert -std::numeric_limits<double>::max to a
+# string. This sadly happens with some compiler support libraries :-(
+
+INCLUDE (CheckCXXSourceRuns)
+
+CHECK_CXX_SOURCE_RUNS("
+ #include <fenv.h>
+ #include <limits>
+ #include <sstream>
+
+ int main()
+ {
+ feenableexcept(FE_DIVBYZERO|FE_INVALID);
+ std::ostringstream description;
+ const double lower_bound = -std::numeric_limits<double>::max();
+
+ description << lower_bound;
+
+ return 0;
+ }
+ "
+ _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")
+ENDIF()
+
+
########################################################################
# #
# Mac OSX specific setup: #
#cmakedefine DEAL_II_HAVE_GETPID
#cmakedefine DEAL_II_HAVE_TIMES
#cmakedefine DEAL_II_HAVE_JN
+#cmakedefine DEAL_II_HAVE_FP_EXCEPTIONS
#cmakedefine DEAL_II_MSVC