diff options
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackCygwinBinaryGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackCygwinSourceGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 10 |
3 files changed, 26 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index f6f51be..4f0eb46 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -106,7 +106,7 @@ const char* cmCPackCygwinBinaryGenerator::GetOutputExtension() "CPACK_CYGWIN_PATCH_NUMBER not specified using 1" << std::endl); } - this->OutputExtension += + this->OutputExtension += patchNumber; this->OutputExtension += ".tar.bz2"; return this->OutputExtension.c_str(); } diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index 0856452..c8fa121 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -124,7 +124,14 @@ int cmCPackCygwinSourceGenerator::CompressFiles(const char* outFileName, std::string outerTarFile = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); outerTarFile += "-"; - outerTarFile += this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + if(!patch) + { + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER" + << " not specified, defaulting to 1\n"); + patch = "1"; + } + outerTarFile += patch; outerTarFile += "-src.tar"; std::string buildScript = cmSystemTools::GetFilenameName( this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT")); @@ -176,7 +183,14 @@ const char* cmCPackCygwinSourceGenerator::GetPackagingInstallPrefix() const char* cmCPackCygwinSourceGenerator::GetOutputExtension() { this->OutputExtension = "-"; - this->OutputExtension += this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + if(!patch) + { + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER" + << " not specified, defaulting to 1\n"); + patch = "1"; + } + this->OutputExtension += patch; this->OutputExtension += "-src.tar.bz2"; return this->OutputExtension.c_str(); } diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index a58953a..8502df0 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -817,7 +817,15 @@ bool cmCPackGenerator::IsSet(const char* name) const //---------------------------------------------------------------------- const char* cmCPackGenerator::GetOption(const char* op) { - return this->MakefileMap->GetDefinition(op); + const char* ret = this->MakefileMap->GetDefinition(op); + if(!ret) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Warning, GetOption return NULL for: " + << op + << std::endl); + } + return ret; } //---------------------------------------------------------------------- |