diff options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index cf1c8fb..dc1b113 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -647,7 +647,7 @@ void cmake::SetArgs(const std::vector<std::string>& args, { directoriesSet = true; std::string path = arg.substr(2); - path = cmSystemTools::CollapseFullPath(path.c_str()); + path = cmSystemTools::CollapseFullPath(path); cmSystemTools::ConvertToUnixSlashes(path); this->SetHomeDirectory(path); } @@ -663,7 +663,7 @@ void cmake::SetArgs(const std::vector<std::string>& args, { directoriesSet = true; std::string path = arg.substr(2); - path = cmSystemTools::CollapseFullPath(path.c_str()); + path = cmSystemTools::CollapseFullPath(path); cmSystemTools::ConvertToUnixSlashes(path); this->SetHomeOutputDirectory(path); } @@ -723,7 +723,7 @@ void cmake::SetArgs(const std::vector<std::string>& args, else if(arg.find("--graphviz=",0) == 0) { std::string path = arg.substr(strlen("--graphviz=")); - path = cmSystemTools::CollapseFullPath(path.c_str()); + path = cmSystemTools::CollapseFullPath(path); cmSystemTools::ConvertToUnixSlashes(path); this->GraphVizFile = path; if ( this->GraphVizFile.empty() ) @@ -1212,7 +1212,7 @@ int cmake::DoPreConfigureChecks() cacheStart += "/CMakeLists.txt"; std::string currentStart = this->GetHomeDirectory(); currentStart += "/CMakeLists.txt"; - if(!cmSystemTools::SameFile(cacheStart.c_str(), currentStart.c_str())) + if(!cmSystemTools::SameFile(cacheStart, currentStart)) { std::string message = "The source \""; message += currentStart; @@ -1946,7 +1946,7 @@ void cmake::UpdateConversionPathTable() { // two entries per line table >> a; table >> b; - cmSystemTools::AddTranslationPath( a.c_str(), b.c_str()); + cmSystemTools::AddTranslationPath( a, b); } } } @@ -2041,7 +2041,7 @@ int cmake::CheckBuildSystem() pi != products.end(); ++pi) { if(!(cmSystemTools::FileExists(pi->c_str()) || - cmSystemTools::FileIsSymlink(pi->c_str()))) + cmSystemTools::FileIsSymlink(*pi))) { if(verbose) { @@ -2164,7 +2164,7 @@ void cmake::TruncateOutputLog(const char* fname) } if ( !this->CacheManager->GetCacheValue("CMAKE_CACHEFILE_DIR") ) { - cmSystemTools::RemoveFile(fullPath.c_str()); + cmSystemTools::RemoveFile(fullPath); return; } off_t fsize = st.st_size; @@ -2390,7 +2390,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) std::string resultFile; std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); std::string destPath = cwd + "/__cmake_systeminformation"; - cmSystemTools::RemoveADirectory(destPath.c_str()); + cmSystemTools::RemoveADirectory(destPath); if (!cmSystemTools::MakeDirectory(destPath.c_str())) { std::cerr << "Error: --system-information must be run from a " @@ -2472,7 +2472,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) } // now run cmake on the CMakeLists file - cmSystemTools::ChangeDirectory(destPath.c_str()); + cmSystemTools::ChangeDirectory(destPath); std::vector<std::string> args2; args2.push_back(args[0]); args2.push_back(destPath); @@ -2488,12 +2488,12 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) } // change back to the original directory - cmSystemTools::ChangeDirectory(cwd.c_str()); + cmSystemTools::ChangeDirectory(cwd); // echo results to stdout if needed if (writeToStdout) { - FILE* fin = cmsys::SystemTools::Fopen(resultFile.c_str(), "r"); + FILE* fin = cmsys::SystemTools::Fopen(resultFile, "r"); if(fin) { const int bufferSize = 4096; @@ -2512,7 +2512,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) } // clean up the directory - cmSystemTools::RemoveADirectory(destPath.c_str()); + cmSystemTools::RemoveADirectory(destPath); return 0; } @@ -2768,7 +2768,7 @@ int cmake::Build(const std::string& dir, const std::vector<std::string>& nativeOptions, bool clean) { - if(!cmSystemTools::FileIsDirectory(dir.c_str())) + if(!cmSystemTools::FileIsDirectory(dir)) { std::cerr << "Error: " << dir << " is not a directory\n"; return 1; |