diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-17 17:23:34 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-17 17:26:11 (GMT) |
commit | 9e24af01375d370ae84c40a95501aa5a33d3fe97 (patch) | |
tree | cb39dc478d6e4742d143244a16cffe75ff22539c /Modules/ExternalProject.cmake | |
parent | 3f25f873f8f0cd4c9c8d5dce29535c6b2757eaea (diff) | |
download | CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.zip CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.tar.gz CMake-9e24af01375d370ae84c40a95501aa5a33d3fe97.tar.bz2 |
Use string(APPEND) in Modules
Automate with:
find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index b812845..2495736 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -415,7 +415,7 @@ file(STRINGS "${CMAKE_CURRENT_LIST_FILE}" lines foreach(line IN LISTS lines) if("${line}" MATCHES "^\\.\\. command:: ([A-Za-z0-9_]+)") if(_ep_func) - set(_ep_keywords_${_ep_func} "${_ep_keywords_${_ep_func}})$") + string(APPEND _ep_keywords_${_ep_func} ")$") endif() set(_ep_func "${CMAKE_MATCH_1}") #message("function [${_ep_func}]") @@ -424,13 +424,13 @@ foreach(line IN LISTS lines) elseif("${line}" MATCHES "^ ``([A-Z0-9_]+) .*``$") set(_ep_key "${CMAKE_MATCH_1}") #message(" keyword [${_ep_key}]") - set(_ep_keywords_${_ep_func} - "${_ep_keywords_${_ep_func}}${_ep_keyword_sep}${_ep_key}") + string(APPEND _ep_keywords_${_ep_func} + "${_ep_keyword_sep}${_ep_key}") set(_ep_keyword_sep "|") endif() endforeach() if(_ep_func) - set(_ep_keywords_${_ep_func} "${_ep_keywords_${_ep_func}})$") + string(APPEND _ep_keywords_${_ep_func} ")$") endif() # Save regex matching supported hash algorithm names. |