diff options
author | Brad King <brad.king@kitware.com> | 2018-07-10 13:25:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-10 13:31:24 (GMT) |
commit | a353d10a7549be2e40977cf239058902e5baf2d8 (patch) | |
tree | c45c15cf12d0a87a8caec1c7a319f52dd1ba3e9f /Modules/CMakeParseImplicitLinkInfo.cmake | |
parent | be69317b971dd381fe771701aa9ed944416e26c6 (diff) | |
download | CMake-a353d10a7549be2e40977cf239058902e5baf2d8.zip CMake-a353d10a7549be2e40977cf239058902e5baf2d8.tar.gz CMake-a353d10a7549be2e40977cf239058902e5baf2d8.tar.bz2 |
Protect implicit link library extraction with policy CMP0054
CMakeParseImplicitLinkInfo tests arbitrary content with `if(MATCHES)`.
Set policy CMP0054 to ensure the line content is never interpreted as a
variable reference (which may also produce a CMP0054 warning).
While at it, also set policy CMP0053 to improve performance.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 935f92d..30659eb 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -1,6 +1,9 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. +cmake_policy(PUSH) +cmake_policy(SET CMP0053 NEW) +cmake_policy(SET CMP0054 NEW) # Function parse implicit linker options. # This is used internally by CMake and should not be included by user @@ -185,3 +188,5 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE) set(${log_var} "${log}" PARENT_SCOPE) endfunction() + +cmake_policy(POP) |