diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-14 16:47:30 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-15 16:30:49 (GMT) |
commit | 7fce78982bbd199e2c34cfec75fca7605f32f43b (patch) | |
tree | 12677805b179c352abfcbde5096f6af53884dfdc /Source/CPack/cmCPackRPMGenerator.cxx | |
parent | 7aeb2622789d04e57051f3592908c5f27d31bb17 (diff) | |
download | CMake-7fce78982bbd199e2c34cfec75fca7605f32f43b.zip CMake-7fce78982bbd199e2c34cfec75fca7605f32f43b.tar.gz CMake-7fce78982bbd199e2c34cfec75fca7605f32f43b.tar.bz2 |
Use new SetOption signatures
Diffstat (limited to 'Source/CPack/cmCPackRPMGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackRPMGenerator.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 2765c58..47db5bb 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -33,13 +33,13 @@ int cmCPackRPMGenerator::InitializeInternal() if (this->GetOption("CPACK_PACKAGE_NAME")) { std::string packageName = this->GetOption("CPACK_PACKAGE_NAME"); std::replace(packageName.begin(), packageName.end(), ' ', '-'); - this->SetOption("CPACK_PACKAGE_NAME", packageName.c_str()); + this->SetOption("CPACK_PACKAGE_NAME", packageName); } /* same for CPACK_PACKAGE_FILE_NAME */ if (this->GetOption("CPACK_PACKAGE_FILE_NAME")) { std::string packageName = this->GetOption("CPACK_PACKAGE_FILE_NAME"); std::replace(packageName.begin(), packageName.end(), ' ', '-'); - this->SetOption("CPACK_PACKAGE_FILE_NAME", packageName.c_str()); + this->SetOption("CPACK_PACKAGE_FILE_NAME", packageName); } return this->Superclass::InitializeInternal(); } @@ -74,19 +74,17 @@ int cmCPackRPMGenerator::PackageOnePack(std::string const& initialToplevel, localToplevel += "/" + packageName; /* replace the TEMP DIRECTORY with the component one */ - this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str()); + this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel); packageFileName += "/" + outputFileName; /* replace proposed CPACK_OUTPUT_FILE_NAME */ - this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName.c_str()); + this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName); /* replace the TEMPORARY package file name */ - this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", - packageFileName.c_str()); + this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", packageFileName); // Tell CPackRPM.cmake the name of the component NAME. - this->SetOption("CPACK_RPM_PACKAGE_COMPONENT", packageName.c_str()); + this->SetOption("CPACK_RPM_PACKAGE_COMPONENT", packageName); // Tell CPackRPM.cmake the path where the component is. std::string component_path = cmStrCat('/', packageName); - this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", - component_path.c_str()); + this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", component_path); if (!this->ReadListFile("Internal/CPack/CPackRPM.cmake")) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake" << std::endl); @@ -365,19 +363,17 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne( localToplevel += "/" + compInstDirName; /* replace the TEMP DIRECTORY with the component one */ - this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str()); + this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel); packageFileName += "/" + outputFileName; /* replace proposed CPACK_OUTPUT_FILE_NAME */ - this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName.c_str()); + this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName); /* replace the TEMPORARY package file name */ - this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", - packageFileName.c_str()); + this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", packageFileName); if (!compInstDirName.empty()) { // Tell CPackRPM.cmake the path where the component is. std::string component_path = cmStrCat('/', compInstDirName); - this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", - component_path.c_str()); + this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", component_path); } if (this->ReadListFile("Internal/CPack/CPackRPM.cmake")) { |