summaryrefslogtreecommitdiffstats
path: root/Modules/CheckFunctionExists.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckFunctionExists.cmake')
-rw-r--r--Modules/CheckFunctionExists.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 2afaa40..e435745 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -7,7 +7,7 @@
#
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
- IF(NOT ${VARIABLE})
+ IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=${FUNCTION})
MESSAGE(STATUS "Looking for ${FUNCTION}")
TRY_COMPILE(${VARIABLE}
@@ -25,5 +25,5 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n" APPEND)
ENDIF(${VARIABLE})
- ENDIF(NOT ${VARIABLE})
+ ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_FUNCTION_EXISTS)