diff options
author | Brad King <brad.king@kitware.com> | 2014-08-18 14:49:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-08-18 14:59:08 (GMT) |
commit | 4ffec8f666b996aedd592e6d26286cef2cb38b50 (patch) | |
tree | 39cde7e337e9956991360785054bb78dfa1c64cb /Modules/CheckIncludeFileCXX.cmake | |
parent | 4f2fcce4b9f897dfa98cb82f3876cd43ab80f69b (diff) | |
download | CMake-4ffec8f666b996aedd592e6d26286cef2cb38b50.zip CMake-4ffec8f666b996aedd592e6d26286cef2cb38b50.tar.gz CMake-4ffec8f666b996aedd592e6d26286cef2cb38b50.tar.bz2 |
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/CheckIncludeFileCXX.cmake')
-rw-r--r-- | Modules/CheckIncludeFileCXX.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 718e667..eff982c 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -44,7 +44,7 @@ # License text for the above reference.) macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) - if(NOT DEFINED "${VARIABLE}") + if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") if(CMAKE_REQUIRED_INCLUDES) set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") else() |