[Cmake-commits] CMake branch, next, updated. v2.8.11-2061-g992fd59
Brad King
brad.king at kitware.com
Fri May 17 09:06:50 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 992fd59e8c589b29f56b6587a034ad38e010538d (commit)
via ffda082e652e1fd8a40dbc3c4d7ba11f18c06aac (commit)
from ae6d79b1c5335e5e79856734edbdb6835b9cef21 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=992fd59e8c589b29f56b6587a034ad38e010538d
commit 992fd59e8c589b29f56b6587a034ad38e010538d
Merge: ae6d79b ffda082
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 17 09:06:42 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 17 09:06:42 2013 -0400
Merge topic 'implicit-link-sanitize-regex' into next
ffda082 Sanitize linker name to parse implicit link line (#14154)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffda082e652e1fd8a40dbc3c4d7ba11f18c06aac
commit ffda082e652e1fd8a40dbc3c4d7ba11f18c06aac
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 17 08:42:07 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri May 17 08:47:35 2013 -0400
Sanitize linker name to parse implicit link line (#14154)
Teach CMakeParseImplicitLinkInfo to convert the CMAKE_LINKER file name
to a regular expression that matches only the original name. Escape
special characters like '+' so they are not treated as regex syntax.
Extend the ImplicitLinkInfoTest to test handling of a CMAKE_LINKER value
with many special characters.
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index fa03630..4724a8c 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -26,6 +26,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(linker "CMAKE_LINKER-NOTFOUND")
if(CMAKE_LINKER)
get_filename_component(linker ${CMAKE_LINKER} NAME)
+ string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" linker "${linker}")
endif()
# Construct a regex to match linker lines. It must match both the
# whole line and just the command (argv[0]).
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index e28d102..055b183 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -508,6 +508,7 @@ list(APPEND platforms msys_g77)
#-----------------------------------------------------------------------------
# Test parsing for all above examples.
+set(CMAKE_LINKER "not-a-linker[]().*+^$?")
foreach(p IN LISTS platforms)
cmake_parse_implicit_link_info("${${p}_text}" libs dirs fwks log "${${p}_obj_regex}")
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeParseImplicitLinkInfo.cmake | 1 +
Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list