summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackExternalGenerator.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/cmCPackExternalGenerator.cxx
parent9488f8a7b7c4b4f180d16cde8a819a7a5216ef56 (diff)
downloadCMake-202a65759b98ed955af56db0415ae5033a90f740.zip
CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.gz
CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.bz2
cmCPackGenerator::GetOption returns cmProp
Diffstat (limited to 'Source/CPack/cmCPackExternalGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackExternalGenerator.cxx37
1 files changed, 18 insertions, 19 deletions
diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx
index e3521a0..9cdaafe 100644
--- a/Source/CPack/cmCPackExternalGenerator.cxx
+++ b/Source/CPack/cmCPackExternalGenerator.cxx
@@ -16,6 +16,7 @@
#include "cmCPackComponentGroup.h"
#include "cmCPackLog.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -60,7 +61,7 @@ int cmCPackExternalGenerator::PackageFiles()
return 0;
}
- const char* packageScript = this->GetOption("CPACK_EXTERNAL_PACKAGE_SCRIPT");
+ cmProp packageScript = this->GetOption("CPACK_EXTERNAL_PACKAGE_SCRIPT");
if (cmNonempty(packageScript)) {
if (!cmSystemTools::FileIsFullPath(packageScript)) {
cmCPackLogger(
@@ -76,10 +77,9 @@ int cmCPackExternalGenerator::PackageFiles()
return 0;
}
- const char* builtPackagesStr =
- this->GetOption("CPACK_EXTERNAL_BUILT_PACKAGES");
- if (builtPackagesStr) {
- cmExpandList(builtPackagesStr, this->packageFileNames, false);
+ cmProp builtPackages = this->GetOption("CPACK_EXTERNAL_BUILT_PACKAGES");
+ if (builtPackages) {
+ cmExpandList(builtPackages, this->packageFileNames, false);
}
}
@@ -181,43 +181,42 @@ int cmCPackExternalGenerator::cmCPackExternalVersionGenerator::WriteToJSON(
return 0;
}
- const char* packageName = this->Parent->GetOption("CPACK_PACKAGE_NAME");
+ cmProp packageName = this->Parent->GetOption("CPACK_PACKAGE_NAME");
if (packageName) {
- root["packageName"] = packageName;
+ root["packageName"] = *packageName;
}
- const char* packageVersion =
- this->Parent->GetOption("CPACK_PACKAGE_VERSION");
+ cmProp packageVersion = this->Parent->GetOption("CPACK_PACKAGE_VERSION");
if (packageVersion) {
- root["packageVersion"] = packageVersion;
+ root["packageVersion"] = *packageVersion;
}
- const char* packageDescriptionFile =
+ cmProp packageDescriptionFile =
this->Parent->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
if (packageDescriptionFile) {
- root["packageDescriptionFile"] = packageDescriptionFile;
+ root["packageDescriptionFile"] = *packageDescriptionFile;
}
- const char* packageDescriptionSummary =
+ cmProp packageDescriptionSummary =
this->Parent->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY");
if (packageDescriptionSummary) {
- root["packageDescriptionSummary"] = packageDescriptionSummary;
+ root["packageDescriptionSummary"] = *packageDescriptionSummary;
}
- const char* buildConfigCstr = this->Parent->GetOption("CPACK_BUILD_CONFIG");
+ cmProp buildConfigCstr = this->Parent->GetOption("CPACK_BUILD_CONFIG");
if (buildConfigCstr) {
- root["buildConfig"] = buildConfigCstr;
+ root["buildConfig"] = *buildConfigCstr;
}
- const char* defaultDirectoryPermissions =
+ cmProp defaultDirectoryPermissions =
this->Parent->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS");
if (cmNonempty(defaultDirectoryPermissions)) {
- root["defaultDirectoryPermissions"] = defaultDirectoryPermissions;
+ root["defaultDirectoryPermissions"] = *defaultDirectoryPermissions;
}
if (cmIsInternallyOn(this->Parent->GetOption("CPACK_SET_DESTDIR"))) {
root["setDestdir"] = true;
root["packagingInstallPrefix"] =
- this->Parent->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
+ *this->Parent->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
} else {
root["setDestdir"] = false;
}