aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-23 04:23:54 -0700
committerChris Robinson <[email protected]>2011-07-23 04:23:54 -0700
commitf32876d4bd7d6b091dd7ecca6b4906ffb2a41615 (patch)
tree45d49700b8e87810c41f3ba2d9d1422e5f2dbc49
parent13f9dbe5825bfcaf7ce3fd8bc68604e5b58a9164 (diff)
Check for the finite() function along with _finite()
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7800b8a0..9f66820a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,12 +259,16 @@ ENDIF()
CHECK_SYMBOL_EXISTS(isfinite math.h HAVE_ISFINITE)
IF(NOT HAVE_ISFINITE)
- CHECK_FUNCTION_EXISTS(_finite HAVE__FINITE)
+ CHECK_FUNCTION_EXISTS(finite HAVE_FINITE)
IF(NOT HAVE__FINITE)
- MESSAGE(FATAL_ERROR "No isfinite function found, please report!")
+ CHECK_FUNCTION_EXISTS(_finite HAVE__FINITE)
+ IF(NOT HAVE__FINITE)
+ MESSAGE(FATAL_ERROR "No isfinite function found, please report!")
+ ENDIF()
+ ADD_DEFINITIONS(-Disfinite=_finite)
+ ELSE()
+ ADD_DEFINITIONS(-Disfinite=finite)
ENDIF()
-
- ADD_DEFINITIONS(-Disfinite=_finite)
ENDIF()
CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN)