summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-25 11:20:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-05-25 11:20:58 (GMT)
commit7120221e2464f3ee0f4d511783a78d0d83e9cb03 (patch)
tree2ed34c889da2564cfa255914fe8a056450f377a6
parentfb04ef3f16b07702b3c8866f0bb4f584e6267f7e (diff)
parent11ac6751a81a3809923f0269aba3db48042ba9be (diff)
downloadCMake-7120221e2464f3ee0f4d511783a78d0d83e9cb03.zip
CMake-7120221e2464f3ee0f4d511783a78d0d83e9cb03.tar.gz
CMake-7120221e2464f3ee0f4d511783a78d0d83e9cb03.tar.bz2
Merge topic 'cpack-component-special-chars'
11ac6751a8 CPack: Support component names with special characters, too Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7290
-rw-r--r--Modules/CPackComponent.cmake18
1 files changed, 10 insertions, 8 deletions
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 1f8c38c..8ca9f28 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -327,32 +327,34 @@ OS X.
if(NOT CPackComponent_CMake_INCLUDED)
set(CPackComponent_CMake_INCLUDED 1)
-# Macro that appends a SET command for the given variable name (var)
-# to the macro named strvar, but only if the variable named "var"
+# Function that appends a SET command for the given variable name (var)
+# to the string named strvar, but only if the variable named "var"
# has been defined. The string will eventually be appended to a CPack
# configuration file.
-macro(cpack_append_variable_set_command var strvar)
+function(cpack_append_variable_set_command var strvar)
if (DEFINED ${var})
string(APPEND ${strvar} "set(${var}")
foreach(APPENDVAL ${${var}})
string(APPEND ${strvar} " ${APPENDVAL}")
endforeach()
string(APPEND ${strvar} ")\n")
+ set(${strvar} "${${strvar}}" PARENT_SCOPE)
endif ()
-endmacro()
+endfunction()
-# Macro that appends a SET command for the given variable name (var)
-# to the macro named strvar, but only if the variable named "var"
+# Function that appends a SET command for the given variable name (var)
+# to the string named strvar, but only if the variable named "var"
# has been defined and is a string. The string will eventually be
# appended to a CPack configuration file.
-macro(cpack_append_string_variable_set_command var strvar)
+function(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)
string(APPEND ${strvar} "set(${var} \"${${var}}\")\n")
endif()
+ set(${strvar} "${${strvar}}" PARENT_SCOPE)
endif ()
-endmacro()
+endfunction()
# Macro that appends a SET command for the given list variable name (var)
# to the macro named strvar, but only if the variable named "var"