summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-07 16:06:44 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-07 16:06:44 (GMT)
commit497779d4b3be8ac387690bc95fdadab122fa5a3c (patch)
tree1d68b0ccff49fe50877c79fe6b5a349c13562367 /Source/CPack/cmCPackCygwinBinaryGenerator.cxx
parent3b7eaad890435cf00bdabbf4ff18288cbd0a1d46 (diff)
downloadCMake-497779d4b3be8ac387690bc95fdadab122fa5a3c.zip
CMake-497779d4b3be8ac387690bc95fdadab122fa5a3c.tar.gz
CMake-497779d4b3be8ac387690bc95fdadab122fa5a3c.tar.bz2
ENH: fix crash in cygwin package stuff
Diffstat (limited to 'Source/CPack/cmCPackCygwinBinaryGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackCygwinBinaryGenerator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
index e8e1f7f..f6f51be 100644
--- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
@@ -98,7 +98,15 @@ int cmCPackCygwinBinaryGenerator::CompressFiles(const char* outFileName,
const char* cmCPackCygwinBinaryGenerator::GetOutputExtension()
{
this->OutputExtension = "-";
- this->OutputExtension += this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
+ const char* patchNumber =this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
+ if(!patchNumber)
+ {
+ patchNumber = "1";
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "CPACK_CYGWIN_PATCH_NUMBER not specified using 1"
+ << std::endl);
+ }
+ this->OutputExtension +=
this->OutputExtension += ".tar.bz2";
return this->OutputExtension.c_str();
}