summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx34
1 files changed, 16 insertions, 18 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 36a0645..bbd3fe4 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() )
@@ -1135,13 +1135,13 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
{
env += this->CCEnvironment;
}
- cmSystemTools::PutEnv(env.c_str());
+ cmSystemTools::PutEnv(env);
env = "CXX=";
if(this->CXXEnvironment.size())
{
env += this->CXXEnvironment;
}
- cmSystemTools::PutEnv(env.c_str());
+ cmSystemTools::PutEnv(env);
}
// set the new
@@ -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;
@@ -1377,9 +1377,7 @@ int cmake::ActualConfigure()
}
else
{
-#if defined(__BORLANDC__) && defined(_WIN32)
- this->SetGlobalGenerator(new cmGlobalBorlandMakefileGenerator);
-#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
std::string installedCompiler;
// Try to find the newest VS installed on the computer and
// use that as a default if -G is not specified
@@ -1948,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);
}
}
}
@@ -2043,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)
{
@@ -2166,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;
@@ -2392,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 "
@@ -2474,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);
@@ -2490,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;
@@ -2514,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;
}
@@ -2770,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;