diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-05 13:44:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-09-13 13:54:27 (GMT) |
commit | 202a65759b98ed955af56db0415ae5033a90f740 (patch) | |
tree | 2e061a12db8ca4295987facfa96c1fb049e31220 /Source/CPack/cmCPackGenerator.cxx | |
parent | 9488f8a7b7c4b4f180d16cde8a819a7a5216ef56 (diff) | |
download | CMake-202a65759b98ed955af56db0415ae5033a90f740.zip CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.gz CMake-202a65759b98ed955af56db0415ae5033a90f740.tar.bz2 |
cmCPackGenerator::GetOption returns cmProp
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 153 |
1 files changed, 70 insertions, 83 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 00e274d..1527e80 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -78,14 +78,14 @@ int cmCPackGenerator::PrepareNames() std::string tempDirectory = cmStrCat(this->GetOption("CPACK_PACKAGE_DIRECTORY"), "/_CPack_Packages/"); - const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG"); + cmProp toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG"); if (toplevelTag) { - tempDirectory += toplevelTag; + tempDirectory += *toplevelTag; tempDirectory += "/"; } - tempDirectory += this->GetOption("CPACK_GENERATOR"); + tempDirectory += *this->GetOption("CPACK_GENERATOR"); std::string topDirectory = tempDirectory; - const char* pfname = this->GetOption("CPACK_PACKAGE_FILE_NAME"); + cmProp pfname = this->GetOption("CPACK_PACKAGE_FILE_NAME"); if (!pfname) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_PACKAGE_FILE_NAME not specified" << std::endl); @@ -99,7 +99,7 @@ int cmCPackGenerator::PrepareNames() return 0; } outName += this->GetOutputExtension(); - const char* pdir = this->GetOption("CPACK_PACKAGE_DIRECTORY"); + cmProp pdir = this->GetOption("CPACK_PACKAGE_DIRECTORY"); if (!pdir) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_PACKAGE_DIRECTORY not specified" << std::endl); @@ -125,7 +125,7 @@ int cmCPackGenerator::PrepareNames() cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl); - const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE"); + cmProp descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE"); if (descFileName && !this->GetOption("CPACK_PACKAGE_DESCRIPTION")) { cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for: " << descFileName << std::endl); @@ -135,7 +135,7 @@ int cmCPackGenerator::PrepareNames() << descFileName << "]" << std::endl); return 0; } - cmsys::ifstream ifs(descFileName); + cmsys::ifstream ifs(descFileName->c_str()); if (!ifs) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot open description file name: " << descFileName @@ -151,9 +151,9 @@ int cmCPackGenerator::PrepareNames() ostr << cmXMLSafe(line) << std::endl; } this->SetOption("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str()); - const char* defFileName = + cmProp defFileName = this->GetOption("CPACK_DEFAULT_PACKAGE_DESCRIPTION_FILE"); - if (defFileName && !strcmp(defFileName, descFileName)) { + if (defFileName && (defFileName == descFileName)) { this->SetOption("CPACK_USED_DEFAULT_PACKAGE_DESCRIPTION_FILE", "ON"); } } @@ -165,7 +165,7 @@ int cmCPackGenerator::PrepareNames() << std::endl); return 0; } - const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM"); + cmProp algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM"); if (algoSignature) { if (!cmCryptoHash::New(algoSignature)) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -215,7 +215,7 @@ int cmCPackGenerator::InstallProject() // prepare default created directory permissions mode_t default_dir_mode_v = 0; mode_t* default_dir_mode = nullptr; - const char* default_dir_install_permissions = + cmProp default_dir_install_permissions = this->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS"); if (cmNonempty(default_dir_install_permissions)) { std::vector<std::string> items = @@ -266,7 +266,7 @@ int cmCPackGenerator::InstallProject() } // Run pre-build actions - const char* preBuildScripts = this->GetOption("CPACK_PRE_BUILD_SCRIPTS"); + cmProp preBuildScripts = this->GetOption("CPACK_PRE_BUILD_SCRIPTS"); if (preBuildScripts) { const auto scripts = cmExpandedList(preBuildScripts, false); for (const auto& script : scripts) { @@ -293,7 +293,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands( bool setDestDir, const std::string& tempInstallDirectory) { (void)setDestDir; - const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS"); + cmProp installCommands = this->GetOption("CPACK_INSTALL_COMMANDS"); if (cmNonempty(installCommands)) { std::string tempInstallDirectoryEnv = cmStrCat("CMAKE_INSTALL_PREFIX=", tempInstallDirectory); @@ -333,7 +333,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( (void)setDestDir; (void)tempInstallDirectory; std::vector<cmsys::RegularExpression> ignoreFilesRegex; - const char* cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES"); + cmProp cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES"); if (cpackIgnoreFiles) { std::vector<std::string> ignoreFilesRegexString = cmExpandedList(cpackIgnoreFiles); @@ -343,8 +343,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( ignoreFilesRegex.emplace_back(ifr); } } - const char* installDirectories = - this->GetOption("CPACK_INSTALLED_DIRECTORIES"); + cmProp installDirectories = this->GetOption("CPACK_INSTALLED_DIRECTORIES"); if (cmNonempty(installDirectories)) { std::vector<std::string> installDirectoriesVector = cmExpandedList(installDirectories); @@ -472,9 +471,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( int cmCPackGenerator::InstallProjectViaInstallScript( bool setDestDir, const std::string& tempInstallDirectory) { - const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPTS"); + cmProp cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPTS"); { - const char* const cmakeScript = this->GetOption("CPACK_INSTALL_SCRIPT"); + cmProp const cmakeScript = this->GetOption("CPACK_INSTALL_SCRIPT"); if (cmakeScript && cmakeScripts) { cmCPackLogger( cmCPackLog::LOG_WARNING, @@ -485,7 +484,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript( cmakeScripts = cmakeScript; } } - if (cmakeScripts && *cmakeScripts) { + if (cmakeScripts && !cmakeScripts->empty()) { cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install scripts: " << cmakeScripts << std::endl); std::vector<std::string> cmakeScriptsVector = cmExpandedList(cmakeScripts); @@ -502,7 +501,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript( std::string dir; if (this->GetOption("CPACK_INSTALL_PREFIX")) { - dir += this->GetOption("CPACK_INSTALL_PREFIX"); + dir += *this->GetOption("CPACK_INSTALL_PREFIX"); } this->SetOption("CMAKE_INSTALL_PREFIX", dir.c_str()); cmCPackLogger( @@ -540,8 +539,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( bool setDestDir, const std::string& baseTempInstallDirectory, const mode_t* default_dir_mode) { - const char* cmakeProjects = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); - const char* cmakeGenerator = this->GetOption("CPACK_CMAKE_GENERATOR"); + cmProp cmakeProjects = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); + cmProp cmakeGenerator = this->GetOption("CPACK_CMAKE_GENERATOR"); std::string absoluteDestFiles; if (cmNonempty(cmakeProjects)) { if (!cmakeGenerator) { @@ -595,7 +594,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( // Determine the installation types for this project (if provided). std::string installTypesVar = "CPACK_" + cmSystemTools::UpperCase(project.Component) + "_INSTALL_TYPES"; - const char* installTypes = this->GetOption(installTypesVar); + cmProp installTypes = this->GetOption(installTypesVar); if (cmNonempty(installTypes)) { std::vector<std::string> installTypesVector = cmExpandedList(installTypes); @@ -608,7 +607,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( // Determine the set of components that will be used in this project std::string componentsVar = "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(project.Component); - const char* components = this->GetOption(componentsVar); + cmProp components = this->GetOption(componentsVar); if (cmNonempty(components)) { cmExpandList(components, componentsVector); for (std::string const& comp : componentsVector) { @@ -625,12 +624,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( std::vector<std::string> buildConfigs; // Try get configuration names given via `-C` CLI option - { - const char* const buildConfigCstr = - this->GetOption("CPACK_BUILD_CONFIG"); - auto buildConfig = buildConfigCstr ? buildConfigCstr : std::string{}; - cmExpandList(buildConfig, buildConfigs); - } + cmExpandList(this->GetOption("CPACK_BUILD_CONFIG"), buildConfigs); // Remove duplicates std::sort(buildConfigs.begin(), buildConfigs.end()); @@ -767,11 +761,11 @@ int cmCPackGenerator::InstallCMakeProject( tempInstallDirectory += this->GetComponentInstallDirNameSuffix(component); if (this->IsOn("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY")) { tempInstallDirectory += "/"; - tempInstallDirectory += this->GetOption("CPACK_PACKAGE_FILE_NAME"); + tempInstallDirectory += *this->GetOption("CPACK_PACKAGE_FILE_NAME"); } } - const char* default_dir_inst_permissions = + cmProp default_dir_inst_permissions = this->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS"); if (cmNonempty(default_dir_inst_permissions)) { mf.AddDefinition("CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS", @@ -795,12 +789,13 @@ int cmCPackGenerator::InstallCMakeProject( // I know this is tricky and awkward but it's the price for // CPACK_SET_DESTDIR backward compatibility. if (cmIsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"))) { - this->SetOption("CPACK_INSTALL_PREFIX", - this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")); + this->SetOption( + "CPACK_INSTALL_PREFIX", + this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX").GetCStr()); } std::string dir; if (this->GetOption("CPACK_INSTALL_PREFIX")) { - dir += this->GetOption("CPACK_INSTALL_PREFIX"); + dir += *this->GetOption("CPACK_INSTALL_PREFIX"); } mf.AddDefinition("CMAKE_INSTALL_PREFIX", dir); @@ -979,7 +974,7 @@ int cmCPackGenerator::InstallCMakeProject( } else { this->SetOption( absoluteDestFileComponent, - cmToCStr(mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"))); + mf.GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES").GetCStr()); } } } @@ -1038,8 +1033,7 @@ int cmCPackGenerator::DoPackage() } if (cmIsOn(this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY"))) { - const char* toplevelDirectory = - this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + cmProp toplevelDirectory = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); if (cmSystemTools::FileExists(toplevelDirectory)) { cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: " << toplevelDirectory @@ -1060,9 +1054,9 @@ int cmCPackGenerator::DoPackage() } cmCPackLogger(cmCPackLog::LOG_DEBUG, "Done install project " << std::endl); - const char* tempPackageFileName = + cmProp tempPackageFileName = this->GetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME"); - const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + cmProp tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); cmsys::Glob gl; @@ -1079,7 +1073,7 @@ int cmCPackGenerator::DoPackage() cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package" << std::endl); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Package files to: " - << (tempPackageFileName ? tempPackageFileName : "(NULL)") + << (tempPackageFileName ? *tempPackageFileName : "(NULL)") << std::endl); if (cmSystemTools::FileExists(tempPackageFileName)) { cmCPackLogger(cmCPackLog::LOG_VERBOSE, @@ -1099,9 +1093,8 @@ int cmCPackGenerator::DoPackage() * may update this during PackageFiles. * (either putting several names or updating the provided one) */ - this->packageFileNames.emplace_back(tempPackageFileName ? tempPackageFileName - : ""); - this->toplevel = tempDirectory; + this->packageFileNames.emplace_back(tempPackageFileName); + this->toplevel = *tempDirectory; { // scope that enables package generators to run internal scripts with // latest CMake policies enabled cmMakefile::ScopePushPop pp{ this->MakefileMap }; @@ -1115,7 +1108,7 @@ int cmCPackGenerator::DoPackage() } } // Run post-build actions - const char* postBuildScripts = this->GetOption("CPACK_POST_BUILD_SCRIPTS"); + cmProp postBuildScripts = this->GetOption("CPACK_POST_BUILD_SCRIPTS"); if (postBuildScripts) { this->MakefileMap->AddDefinition("CPACK_PACKAGE_FILES", cmJoin(this->packageFileNames, ";")); @@ -1135,8 +1128,8 @@ int cmCPackGenerator::DoPackage() } /* Prepare checksum algorithm*/ - const char* algo = this->GetOption("CPACK_PACKAGE_CHECKSUM"); - std::unique_ptr<cmCryptoHash> crypto = cmCryptoHash::New(algo ? algo : ""); + cmProp algo = this->GetOption("CPACK_PACKAGE_CHECKSUM"); + std::unique_ptr<cmCryptoHash> crypto = cmCryptoHash::New(algo); /* * Copy the generated packages to final destination @@ -1151,19 +1144,19 @@ int cmCPackGenerator::DoPackage() for (std::string const& pkgFileName : this->packageFileNames) { std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX")); std::string filename(cmSystemTools::GetFilenameName(pkgFileName)); - tempPackageFileName = pkgFileName.c_str(); + tempPackageFileName = cmProp(pkgFileName); tmpPF += "/" + filename; const char* packageFileName = tmpPF.c_str(); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): " - << (tempPackageFileName ? tempPackageFileName : "(NULL)") + << (tempPackageFileName ? *tempPackageFileName : "(NULL)") << " to " << (packageFileName ? packageFileName : "(NULL)") << std::endl); if (!cmSystemTools::CopyFileIfDifferent(pkgFileName, tmpPF)) { cmCPackLogger( cmCPackLog::LOG_ERROR, "Problem copying the package: " - << (tempPackageFileName ? tempPackageFileName : "(NULL)") << " to " + << (tempPackageFileName ? *tempPackageFileName : "(NULL)") << " to " << (packageFileName ? packageFileName : "(NULL)") << std::endl); return 0; } @@ -1200,7 +1193,7 @@ int cmCPackGenerator::Initialize(const std::string& name, cmMakefile* mf) // set the running generator name this->SetOption("CPACK_GENERATOR", this->Name.c_str()); // Load the project specific config file - const char* config = this->GetOption("CPACK_PROJECT_CONFIG_FILE"); + cmProp config = this->GetOption("CPACK_PROJECT_CONFIG_FILE"); if (config) { mf->ReadListFile(config); } @@ -1250,15 +1243,14 @@ bool cmCPackGenerator::IsSetToEmpty(const std::string& op) const return false; } -const char* cmCPackGenerator::GetOption(const std::string& op) const +cmProp cmCPackGenerator::GetOption(const std::string& op) const { cmProp ret = this->MakefileMap->GetDefinition(op); if (!ret) { cmCPackLogger(cmCPackLog::LOG_DEBUG, "Warning, GetOption return NULL for: " << op << std::endl); - return nullptr; } - return ret->c_str(); + return ret; } std::vector<std::string> cmCPackGenerator::GetOptions() const @@ -1311,7 +1303,7 @@ const char* cmCPackGenerator::GetPackagingInstallPrefix() << this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'" << std::endl); - return this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); + return this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")->c_str(); } std::string cmCPackGenerator::FindTemplate(const char* name) @@ -1391,12 +1383,8 @@ int cmCPackGenerator::PrepareGroupingKind() method = ONE_PACKAGE_PER_GROUP; } - std::string groupingType; - // Second way to specify grouping - if (nullptr != this->GetOption("CPACK_COMPONENTS_GROUPING")) { - groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING"); - } + std::string groupingType = *this->GetOption("CPACK_COMPONENTS_GROUPING"); if (!groupingType.empty()) { cmCPackLogger(cmCPackLog::LOG_VERBOSE, @@ -1477,18 +1465,18 @@ std::string cmCPackGenerator::GetComponentPackageFileName( if (isGroupName) { std::string groupDispVar = "CPACK_COMPONENT_GROUP_" + cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME"; - const char* groupDispName = this->GetOption(groupDispVar); + cmProp groupDispName = this->GetOption(groupDispVar); if (groupDispName) { - suffix = "-" + std::string(groupDispName); + suffix = "-" + *groupDispName; } } /* the [single] component case */ else { std::string dispVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME"; - const char* dispName = this->GetOption(dispVar); + cmProp dispName = this->GetOption(dispVar); if (dispName) { - suffix = "-" + std::string(dispName); + suffix = "-" + *dispName; } } } @@ -1531,9 +1519,9 @@ cmCPackInstallationType* cmCPackGenerator::GetInstallationType( "CPACK_INSTALL_TYPE_" + cmsys::SystemTools::UpperCase(name); installType->Name = name; - const char* displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); + cmProp displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); if (cmNonempty(displayName)) { - installType->DisplayName = displayName; + installType->DisplayName = *displayName; } else { installType->DisplayName = installType->Name; } @@ -1553,9 +1541,9 @@ cmCPackComponent* cmCPackGenerator::GetComponent( std::string macroPrefix = "CPACK_COMPONENT_" + cmsys::SystemTools::UpperCase(name); component->Name = name; - const char* displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); + cmProp displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); if (cmNonempty(displayName)) { - component->DisplayName = displayName; + component->DisplayName = *displayName; } else { component->DisplayName = component->Name; } @@ -1565,17 +1553,17 @@ cmCPackComponent* cmCPackGenerator::GetComponent( component->IsDownloaded = this->IsOn(macroPrefix + "_DOWNLOADED") || cmIsOn(this->GetOption("CPACK_DOWNLOAD_ALL")); - const char* archiveFile = this->GetOption(macroPrefix + "_ARCHIVE_FILE"); + cmProp archiveFile = this->GetOption(macroPrefix + "_ARCHIVE_FILE"); if (cmNonempty(archiveFile)) { - component->ArchiveFile = archiveFile; + component->ArchiveFile = *archiveFile; } - const char* plist = this->GetOption(macroPrefix + "_PLIST"); + cmProp plist = this->GetOption(macroPrefix + "_PLIST"); if (cmNonempty(plist)) { - component->Plist = plist; + component->Plist = *plist; } - const char* groupName = this->GetOption(macroPrefix + "_GROUP"); + cmProp groupName = this->GetOption(macroPrefix + "_GROUP"); if (cmNonempty(groupName)) { component->Group = this->GetComponentGroup(projectName, groupName); component->Group->Components.push_back(component); @@ -1583,13 +1571,13 @@ cmCPackComponent* cmCPackGenerator::GetComponent( component->Group = nullptr; } - const char* description = this->GetOption(macroPrefix + "_DESCRIPTION"); + cmProp description = this->GetOption(macroPrefix + "_DESCRIPTION"); if (cmNonempty(description)) { - component->Description = description; + component->Description = *description; } // Determine the installation types. - const char* installTypes = this->GetOption(macroPrefix + "_INSTALL_TYPES"); + cmProp installTypes = this->GetOption(macroPrefix + "_INSTALL_TYPES"); if (cmNonempty(installTypes)) { std::vector<std::string> installTypesVector = cmExpandedList(installTypes); @@ -1600,7 +1588,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent( } // Determine the component dependencies. - const char* depends = this->GetOption(macroPrefix + "_DEPENDS"); + cmProp depends = this->GetOption(macroPrefix + "_DEPENDS"); if (cmNonempty(depends)) { std::vector<std::string> dependsVector = cmExpandedList(depends); for (std::string const& depend : dependsVector) { @@ -1624,21 +1612,20 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup( if (!hasGroup) { // Define the group group->Name = name; - const char* displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); + cmProp displayName = this->GetOption(macroPrefix + "_DISPLAY_NAME"); if (cmNonempty(displayName)) { - group->DisplayName = displayName; + group->DisplayName = *displayName; } else { group->DisplayName = group->Name; } - const char* description = this->GetOption(macroPrefix + "_DESCRIPTION"); + cmProp description = this->GetOption(macroPrefix + "_DESCRIPTION"); if (cmNonempty(description)) { - group->Description = description; + group->Description = *description; } group->IsBold = this->IsOn(macroPrefix + "_BOLD_TITLE"); group->IsExpandedByDefault = this->IsOn(macroPrefix + "_EXPANDED"); - const char* parentGroupName = - this->GetOption(macroPrefix + "_PARENT_GROUP"); + cmProp parentGroupName = this->GetOption(macroPrefix + "_PARENT_GROUP"); if (cmNonempty(parentGroupName)) { group->ParentGroup = this->GetComponentGroup(projectName, parentGroupName); |