diff options
Diffstat (limited to 'Source/CPack/cmCPackExternalGenerator.cxx')
| -rw-r--r-- | Source/CPack/cmCPackExternalGenerator.cxx | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx index e3521a0..157ee1d 100644 --- a/Source/CPack/cmCPackExternalGenerator.cxx +++ b/Source/CPack/cmCPackExternalGenerator.cxx @@ -18,6 +18,7 @@ #include "cmMakefile.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" +#include "cmValue.h" int cmCPackExternalGenerator::InitializeInternal() { @@ -60,7 +61,7 @@ int cmCPackExternalGenerator::PackageFiles() return 0; } - const char* packageScript = this->GetOption("CPACK_EXTERNAL_PACKAGE_SCRIPT"); + cmValue 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); + cmValue 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"); + cmValue packageName = this->Parent->GetOption("CPACK_PACKAGE_NAME"); if (packageName) { - root["packageName"] = packageName; + root["packageName"] = *packageName; } - const char* packageVersion = - this->Parent->GetOption("CPACK_PACKAGE_VERSION"); + cmValue packageVersion = this->Parent->GetOption("CPACK_PACKAGE_VERSION"); if (packageVersion) { - root["packageVersion"] = packageVersion; + root["packageVersion"] = *packageVersion; } - const char* packageDescriptionFile = + cmValue packageDescriptionFile = this->Parent->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE"); if (packageDescriptionFile) { - root["packageDescriptionFile"] = packageDescriptionFile; + root["packageDescriptionFile"] = *packageDescriptionFile; } - const char* packageDescriptionSummary = + cmValue 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"); + cmValue buildConfigCstr = this->Parent->GetOption("CPACK_BUILD_CONFIG"); if (buildConfigCstr) { - root["buildConfig"] = buildConfigCstr; + root["buildConfig"] = *buildConfigCstr; } - const char* defaultDirectoryPermissions = + cmValue 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; } |
