summaryrefslogtreecommitdiffstats
path: root/Source
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 /Source
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 'Source')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 560e5c1..6f21d87 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -507,7 +507,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
this->GetOption("GEN_CPACK_OUTPUT_FILE_NAME"));
packageFileNames.push_back(std::move(packageFileName));
- if (this->IsOn("GEN_CPACK_DEBIAN_DEBUGINFO_PACKAGE")) {
+ if (this->IsOn("GEN_CPACK_DEBIAN_DEBUGINFO_PACKAGE") &&
+ this->GetOption("GEN_DBGSYMDIR")) {
cmsys::Glob gl;
std::string findExpr(this->GetOption("GEN_DBGSYMDIR"));
findExpr += "/*";