summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePrintHelpers.cmake
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:41:13 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:41:13 (GMT)
commit5d0d980d9949daf596e10715d686adc95c1c232b (patch)
tree45ec5b1fd21b10dc996083f5fe5657d8b07c3232 /Modules/CMakePrintHelpers.cmake
parent73c618be7036c693cbff764b3765de1bf4626cfb (diff)
downloadCMake-5d0d980d9949daf596e10715d686adc95c1c232b.zip
CMake-5d0d980d9949daf596e10715d686adc95c1c232b.tar.gz
CMake-5d0d980d9949daf596e10715d686adc95c1c232b.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/CMakePrintHelpers.cmake')
-rw-r--r--Modules/CMakePrintHelpers.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake
index 474fa41..61a0909 100644
--- a/Modules/CMakePrintHelpers.cmake
+++ b/Modules/CMakePrintHelpers.cmake
@@ -55,9 +55,9 @@ function(CMAKE_PRINT_VARIABLES)
set(msg "")
foreach(var ${ARGN})
if(msg)
- set(msg "${msg} ; ")
+ string(APPEND msg " ; ")
endif()
- set(msg "${msg}${var}=\"${${var}}\"")
+ string(APPEND msg "${var}=\"${${var}}\"")
endforeach()
message(STATUS "${msg}")
endfunction()
@@ -132,21 +132,21 @@ function(CMAKE_PRINT_PROPERTIES )
if(keyword STREQUAL "TARGET")
if(NOT TARGET ${item})
set(itemExists FALSE)
- set(msg "${msg}\n No such TARGET \"${item}\" !\n\n")
+ string(APPEND msg "\n No such TARGET \"${item}\" !\n\n")
endif()
endif()
if (itemExists)
- set(msg "${msg} Properties for ${keyword} ${item}:\n")
+ string(APPEND msg " Properties for ${keyword} ${item}:\n")
foreach(prop ${CPP_PROPERTIES})
get_property(propertySet ${keyword} ${item} PROPERTY "${prop}" SET)
if(propertySet)
get_property(property ${keyword} ${item} PROPERTY "${prop}")
- set(msg "${msg} ${item}.${prop} = \"${property}\"\n")
+ string(APPEND msg " ${item}.${prop} = \"${property}\"\n")
else()
- set(msg "${msg} ${item}.${prop} = <NOTFOUND>\n")
+ string(APPEND msg " ${item}.${prop} = <NOTFOUND>\n")
endif()
endforeach()
endif()