summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-18 17:30:59 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-18 17:32:47 (GMT)
commitd1cf09e3c2ded58d08288a42c0eb9038727c22c7 (patch)
treeb3c007864b16e2171d578d4ad17c7ce664e922af
parentec1ec47193fcab7084e8edd977d3bebd1e8c73cb (diff)
downloadCMake-d1cf09e3c2ded58d08288a42c0eb9038727c22c7.zip
CMake-d1cf09e3c2ded58d08288a42c0eb9038727c22c7.tar.gz
CMake-d1cf09e3c2ded58d08288a42c0eb9038727c22c7.tar.bz2
CMakeParseImplicitLinkInfo: Avoid if() auto-deref in quoted arg
When matching implicit library names, use a sentinel "x" to avoid ever expanding the library name as a variable. This was detected by a CMP0054 warning.
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index fcc13da..8abc465 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -124,7 +124,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
# We remove items that are not language-specific.
set(implicit_libs "")
foreach(lib IN LISTS implicit_libs_tmp)
- if("${lib}" MATCHES "^(crt.*\\.o|gcc.*|System.*)$")
+ if("x${lib}" MATCHES "^x(crt.*\\.o|gcc.*|System.*)$")
set(log "${log} remove lib [${lib}]\n")
elseif(IS_ABSOLUTE "${lib}")
get_filename_component(abs "${lib}" ABSOLUTE)