summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackCygwinSourceGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-05 13:44:04 (GMT)
committerBrad King <brad.king@kitware.com>2021-09-13 13:54:27 (GMT)
commit202a65759b98ed955af56db0415ae5033a90f740 (patch)
tree2e061a12db8ca4295987facfa96c1fb049e31220 /Source/CPack/cmCPackCygwinSourceGenerator.cxx
parent9488f8a7b7c4b4f180d16cde8a819a7a5216ef56 (diff)
downloadCMake-202a65759b98ed955af56db0415ae5033a90f740.zip
CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.gz
CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.bz2
cmCPackGenerator::GetOption returns cmProp
Diffstat (limited to 'Source/CPack/cmCPackCygwinSourceGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackCygwinSourceGenerator.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
index 64a88eb..684a988 100644
--- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
@@ -8,6 +8,7 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -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");
+ cmProp 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");
+ cmProp 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();
}