summaryrefslogtreecommitdiffstats
path: root/Modules/CPackComponent.cmake
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-17 17:23:34 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-17 17:26:11 (GMT)
commit9e24af01375d370ae84c40a95501aa5a33d3fe97 (patch)
treecb39dc478d6e4742d143244a16cffe75ff22539c /Modules/CPackComponent.cmake
parent3f25f873f8f0cd4c9c8d5dce29535c6b2757eaea (diff)
downloadCMake-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/CPackComponent.cmake')
-rw-r--r--Modules/CPackComponent.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 2adc9b9..3a10b99 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -309,11 +309,11 @@ set(CPackComponent_CMake_INCLUDED 1)
# configuration file.
macro(cpack_append_variable_set_command var strvar)
if (DEFINED ${var})
- set(${strvar} "${${strvar}}set(${var}")
+ string(APPEND ${strvar} "set(${var}")
foreach(APPENDVAL ${${var}})
- set(${strvar} "${${strvar}} ${APPENDVAL}")
+ string(APPEND ${strvar} " ${APPENDVAL}")
endforeach()
- set(${strvar} "${${strvar}})\n")
+ string(APPEND ${strvar} ")\n")
endif ()
endmacro()
@@ -325,7 +325,7 @@ macro(cpack_append_string_variable_set_command var strvar)
if (DEFINED ${var})
list(LENGTH ${var} CPACK_APP_VALUE_LEN)
if(${CPACK_APP_VALUE_LEN} EQUAL 1)
- set(${strvar} "${${strvar}}set(${var} \"${${var}}\")\n")
+ string(APPEND ${strvar} "set(${var} \"${${var}}\")\n")
endif()
endif ()
endmacro()
@@ -352,7 +352,7 @@ macro(cpack_append_option_set_command var strvar)
if (${var})
list(LENGTH ${var} CPACK_APP_VALUE_LEN)
if(${CPACK_APP_VALUE_LEN} EQUAL 1)
- set(${strvar} "${${strvar}}set(${var} TRUE)\n")
+ string(APPEND ${strvar} "set(${var} TRUE)\n")
endif()
endif ()
endmacro()