aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)