diff options
Diffstat (limited to 'Source/CPack/cmCPackCygwinSourceGenerator.cxx')
| -rw-r--r-- | Source/CPack/cmCPackCygwinSourceGenerator.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index 64a88eb..59df380 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -9,6 +9,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmValue.h" #include "cmake.h" // Includes needed for implementation of RenameFile. This is not in @@ -94,14 +95,15 @@ int cmCPackCygwinSourceGenerator::PackageFiles() } std::string outerTarFile = cmStrCat(this->GetOption("CPACK_TEMPORARY_DIRECTORY"), '-'); - const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + cmValue 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 += "1"; + } else { + outerTarFile += patch; } - outerTarFile += patch; outerTarFile += "-src.tar.bz2"; std::string tmpDir = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); std::string buildScript = @@ -145,14 +147,15 @@ const char* cmCPackCygwinSourceGenerator::GetPackagingInstallPrefix() const char* cmCPackCygwinSourceGenerator::GetOutputExtension() { this->OutputExtension = "-"; - const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + cmValue 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 += "1"; + } else { + this->OutputExtension += patch; } - this->OutputExtension += patch; this->OutputExtension += "-src.tar.bz2"; return this->OutputExtension.c_str(); } |
