summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-17 17:36:07 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-17 17:36:07 (GMT)
commit25caf7bafeb18d9394eb2d13686970c68e9ad88c (patch)
tree11fe6f264cf7b71fe62d725d0c345a10811ed612 /Source/CPack
parent68e20f674a48be38d60e129f600faf7c483f2b97 (diff)
downloadCMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.zip
CMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.tar.gz
CMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.tar.bz2
cmMakefile::ReadListFile() accepts std::string argument
Same for cmMakefile::ReadDependentFile(); some cleanup
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackExternalGenerator.cxx2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx6
-rw-r--r--Source/CPack/cpack.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx
index ff69418..9dc9853 100644
--- a/Source/CPack/cmCPackExternalGenerator.cxx
+++ b/Source/CPack/cmCPackExternalGenerator.cxx
@@ -68,7 +68,7 @@ int cmCPackExternalGenerator::PackageFiles()
return 0;
}
- int res = this->MakefileMap->ReadListFile(packageScript);
+ bool res = this->MakefileMap->ReadListFile(packageScript);
if (cmSystemTools::GetErrorOccuredFlag() || !res) {
return 0;
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index b205105..70a7faa 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -498,7 +498,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
tempInstallDirectory.c_str());
this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR",
tempInstallDirectory.c_str());
- int res = this->MakefileMap->ReadListFile(installScript.c_str());
+ bool res = this->MakefileMap->ReadListFile(installScript);
if (cmSystemTools::GetErrorOccuredFlag() || !res) {
return 0;
}
@@ -851,7 +851,7 @@ int cmCPackGenerator::InstallCMakeProject(
mf.AddDefinition("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", "1");
}
// do installation
- int res = mf.ReadListFile(installFile.c_str());
+ bool res = mf.ReadListFile(installFile);
// forward definition of CMAKE_ABSOLUTE_DESTINATION_FILES
// to CPack (may be used by generators like CPack RPM or DEB)
// in order to transparently handle ABSOLUTE PATH
@@ -927,7 +927,7 @@ bool cmCPackGenerator::ReadListFile(const char* moduleName)
{
bool retval;
std::string fullPath = this->MakefileMap->GetModulesFile(moduleName);
- retval = this->MakefileMap->ReadListFile(fullPath.c_str());
+ retval = this->MakefileMap->ReadListFile(fullPath);
// include FATAL_ERROR and ERROR in the return status
retval = retval && (!cmSystemTools::GetErrorOccuredFlag());
return retval;
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index db9a0e7..d4c867b 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -256,7 +256,7 @@ int main(int argc, char const* const* argv)
// paths, so FIND_XXX() commands can be used in scripts
std::string systemFile =
globalMF.GetModulesFile("CMakeDetermineSystem.cmake");
- if (!globalMF.ReadListFile(systemFile.c_str())) {
+ if (!globalMF.ReadListFile(systemFile)) {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
"Error reading CMakeDetermineSystem.cmake" << std::endl);
return 1;
@@ -264,7 +264,7 @@ int main(int argc, char const* const* argv)
systemFile =
globalMF.GetModulesFile("CMakeSystemSpecificInformation.cmake");
- if (!globalMF.ReadListFile(systemFile.c_str())) {
+ if (!globalMF.ReadListFile(systemFile)) {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
"Error reading CMakeSystemSpecificInformation.cmake"
<< std::endl);
@@ -280,7 +280,7 @@ int main(int argc, char const* const* argv)
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
"Read CPack configuration file: " << cpackConfigFile
<< std::endl);
- if (!globalMF.ReadListFile(cpackConfigFile.c_str())) {
+ if (!globalMF.ReadListFile(cpackConfigFile)) {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
"Problem reading CPack config file: \""
<< cpackConfigFile << "\"" << std::endl);