aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-20 03:18:11 -0700
committerChris Robinson <[email protected]>2011-07-20 03:18:11 -0700
commit5a484f7493c2c4151df80d9399589515e096575d (patch)
tree4f1259e2040b2f5d8fa9cbecf4c0eea39eee59f1
parent244d60fb961336280895413a0c6881388fba9877 (diff)
Look for an isfinite function
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97d9b6e9..475ac6f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -256,6 +256,16 @@ IF(NOT HAVE_VSNPRINTF)
ADD_DEFINITIONS(-Dvsnprintf=_vsnprintf)
ENDIF()
+CHECK_SYMBOL_EXISTS(isfinite math.h HAVE_ISFINITE)
+IF(NOT HAVE_ISFINITE)
+ CHECK_FUNCTION_EXISTS(_finite HAVE__FINITE)
+ IF(NOT HAVE__FINITE)
+ MESSAGE(FATAL_ERROR "No isfinite function found, please report!")
+ ENDIF()
+
+ ADD_DEFINITIONS(-Disfinite=_finite)
+ENDIF()
+
CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN)
IF(NOT HAVE_ISNAN)
CHECK_FUNCTION_EXISTS(_isnan HAVE__ISNAN)