summaryrefslogtreecommitdiff
path: root/Modules/CheckSymbolExists.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-08-18 10:49:30 -0400
committerBrad King <brad.king@kitware.com>2014-08-18 10:59:08 -0400
commit4ffec8f666b996aedd592e6d26286cef2cb38b50 (patch)
tree39cde7e337e9956991360785054bb78dfa1c64cb /Modules/CheckSymbolExists.cmake
parent4f2fcce4b9f897dfa98cb82f3876cd43ab80f69b (diff)
downloadcmake-4ffec8f666b996aedd592e6d26286cef2cb38b50.tar.gz
Check*: Add compatibility hack for old VXL code
The cleanup in commit 4f2fcce4 (Check*: Allow result variables to contain regex special characters, 2014-07-31) broke old VXL code that abuses the old "if(MATCHES)" implementation by using SET( ${VARIABLE} ${VARIABLE} ) to reset a check result variable. Add a compatibility hack to the CheckFunctionExists, CheckIncludeFileCXX, and CheckSymbolExists modules to re-run their checks when the result variable is set to its own name. Use STREQUAL instead of MATCHES so that special characters still work.
Diffstat (limited to 'Modules/CheckSymbolExists.cmake')
-rw-r--r--Modules/CheckSymbolExists.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 6f50c88f45..c31f6b6e37 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -50,7 +50,7 @@ macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
endmacro()
macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
- if(NOT DEFINED "${VARIABLE}")
+ if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}")
set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
if(CMAKE_REQUIRED_LIBRARIES)