summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-26 12:00:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-26 12:00:21 (GMT)
commitee78f4e1daf72735d608e22f0c99c5e28a640601 (patch)
tree4603eaeb4e7184c0981b4a06260600352fe58e6b
parent911972903b7cfdb4a0ff356ae43352822b5bbd76 (diff)
parent20c204244b4000dc209da42a1b2a39c06c454419 (diff)
downloadCMake-ee78f4e1daf72735d608e22f0c99c5e28a640601.zip
CMake-ee78f4e1daf72735d608e22f0c99c5e28a640601.tar.gz
CMake-ee78f4e1daf72735d608e22f0c99c5e28a640601.tar.bz2
Merge topic 'pr.checksymbol'
20c204244b CheckSymbolExists: Fix CMP0054 warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1884
-rw-r--r--Modules/CheckSymbolExists.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index d9c9ae4..3483121 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -45,6 +45,9 @@ the way the check is run:
include_guard(GLOBAL)
+cmake_policy(PUSH)
+cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
+
macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
if(CMAKE_C_COMPILER_LOADED)
__CHECK_SYMBOL_EXISTS_IMPL("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
@@ -116,3 +119,5 @@ macro(__CHECK_SYMBOL_EXISTS_IMPL SOURCEFILE SYMBOL FILES VARIABLE)
endif()
endif()
endmacro()
+
+cmake_policy(POP)