summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-05 14:07:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-11-05 14:07:58 (GMT)
commitb75ffd5ee088fc9c04e61d5d4dc42b47de74a7cb (patch)
treeaa86ac51d4b024af5629e9d3b79b9a4258208f71 /Modules
parent65ba25c2f89fac74b67916a6903ceabf53c5ecee (diff)
parent58c8d649e178ad775012dfdf75a5118cbd2de23a (diff)
downloadCMake-b75ffd5ee088fc9c04e61d5d4dc42b47de74a7cb.zip
CMake-b75ffd5ee088fc9c04e61d5d4dc42b47de74a7cb.tar.gz
CMake-b75ffd5ee088fc9c04e61d5d4dc42b47de74a7cb.tar.bz2
Merge topic 'CheckLinkerFlag-policies'
58c8d649e1 CheckLinkerFlag: Set policies needed by the implementation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6701
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckLinkerFlag.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CheckLinkerFlag.cmake b/Modules/CheckLinkerFlag.cmake
index 28ac2e3..e85e43e 100644
--- a/Modules/CheckLinkerFlag.cmake
+++ b/Modules/CheckLinkerFlag.cmake
@@ -41,6 +41,10 @@ include_guard(GLOBAL)
include(CMakeCheckCompilerFlagCommonPatterns)
+cmake_policy(PUSH)
+cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
+cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
+
function(CHECK_LINKER_FLAG _lang _flag _var)
get_property (_supported_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
if (NOT _lang IN_LIST _supported_languages)
@@ -82,3 +86,5 @@ function(CHECK_LINKER_FLAG _lang _flag _var)
endforeach()
set(${_var} "${${_var}}" PARENT_SCOPE)
endfunction()
+
+cmake_policy(POP)