Sfoglia il codice sorgente

CheckSymbolExists: Fix CMP0054 warning

Ruslan Baratov 7 anni fa
parent
commit
20c204244b
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      Modules/CheckSymbolExists.cmake

+ 5 - 0
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)