summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndrew Fuller <afuller@teradici.com>2020-10-30 02:00:49 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-16 19:03:07 (GMT)
commitc826745f5af81c3b1eb9448a102ca247752aa760 (patch)
tree64c026c07bdd39b0277b004e94570dd00d3914d3 /Modules
parent01b473b81098e95ac3e6cbf173c78bf02bdf036c (diff)
downloadCMake-c826745f5af81c3b1eb9448a102ca247752aa760.zip
CMake-c826745f5af81c3b1eb9448a102ca247752aa760.tar.gz
CMake-c826745f5af81c3b1eb9448a102ca247752aa760.tar.bz2
CPack/DEB: Do not crash when asked for debug symbols when there are none
Fixes: #21356
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 431b074..48d451a 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -768,6 +768,10 @@ function(cpack_deb_prepare_package_vars)
set(GEN_CPACK_DBGSYM_OUTPUT_FILE_NAME "${CPACK_DBGSYM_OUTPUT_FILE_NAME}" PARENT_SCOPE)
list(JOIN BUILD_IDS " " BUILD_IDS)
set(GEN_BUILD_IDS "${BUILD_IDS}" PARENT_SCOPE)
+ else()
+ unset(GEN_DBGSYMDIR PARENT_SCOPE)
+ unset(GEN_CPACK_DBGSYM_OUTPUT_FILE_NAME PARENT_SCOPE)
+ unset(GEN_BUILD_IDS PARENT_SCOPE)
endif()
endfunction()