diff options
author | Brad King <brad.king@kitware.com> | 2020-03-26 13:11:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-26 13:11:47 (GMT) |
commit | 4e74a59ab55cf0c1332a61a379b79b9c6f1cf1d5 (patch) | |
tree | 46f5236691c927e2d26700bdeeef7e2553e83c56 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 545875bebe8faec350dbe23bbae58eb6c17e6524 (diff) | |
parent | 25f48761faad8308f23690a51030a49d05007391 (diff) | |
download | CMake-4e74a59ab55cf0c1332a61a379b79b9c6f1cf1d5.zip CMake-4e74a59ab55cf0c1332a61a379b79b9c6f1cf1d5.tar.gz CMake-4e74a59ab55cf0c1332a61a379b79b9c6f1cf1d5.tar.bz2 |
Merge topic 'cleanup-CollapseFullPath-calls'
25f48761fa Simplify absolute path conversions using CollapseFullPath full signature
12b39aef75 Remove redundant calls to CollapseFullPath
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4518
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 53bd1d5..3191350 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -623,8 +623,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( this->MaybeConvertWatcomShellCommand(cmSystemTools::GetCMakeCommand()); if (cmakeShellCommand.empty()) { cmakeShellCommand = this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), - cmOutputConverter::SHELL); + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); } /* clang-format off */ @@ -648,16 +647,14 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( << "# The top-level source directory on which CMake was run.\n" << "CMAKE_SOURCE_DIR = " << this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(this->GetSourceDirectory()), - cmOutputConverter::SHELL) + this->GetSourceDirectory(), cmOutputConverter::SHELL) << "\n" << "\n"; makefileStream << "# The top-level build directory on which CMake was run.\n" << "CMAKE_BINARY_DIR = " << this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(this->GetBinaryDirectory()), - cmOutputConverter::SHELL) + this->GetBinaryDirectory(), cmOutputConverter::SHELL) << "\n" << "\n"; /* clang-format on */ @@ -1054,10 +1051,9 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( cleanfile += filename; } cleanfile += ".cmake"; - std::string cleanfilePath = cmSystemTools::CollapseFullPath(cleanfile); - cmsys::ofstream fout(cleanfilePath.c_str()); + cmsys::ofstream fout(cleanfile.c_str()); if (!fout) { - cmSystemTools::Error("Could not create " + cleanfilePath); + cmSystemTools::Error("Could not create " + cleanfile); } if (!files.empty()) { fout << "file(REMOVE_RECURSE\n"; @@ -1117,10 +1113,9 @@ void cmLocalUnixMakefileGenerator3::AppendDirectoryCleanCommand( cmStrCat(currentBinaryDir, "/CMakeFiles/cmake_directory_clean.cmake"); // Write clean script { - std::string cleanfilePath = cmSystemTools::CollapseFullPath(cleanfile); - cmsys::ofstream fout(cleanfilePath.c_str()); + cmsys::ofstream fout(cleanfile.c_str()); if (!fout) { - cmSystemTools::Error("Could not create " + cleanfilePath); + cmSystemTools::Error("Could not create " + cleanfile); return; } fout << "file(REMOVE_RECURSE\n"; @@ -1191,9 +1186,8 @@ void cmLocalUnixMakefileGenerator3::AppendEcho( color_name); if (progress) { cmd += "--progress-dir="; - cmd += this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(progress->Dir), - cmOutputConverter::SHELL); + cmd += this->ConvertToOutputFormat(progress->Dir, + cmOutputConverter::SHELL); cmd += " "; cmd += "--progress-num="; cmd += progress->Arg; @@ -1633,15 +1627,14 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( { std::ostringstream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; - progCmd << this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL); + progCmd << this->ConvertToOutputFormat(progressDir, + cmOutputConverter::SHELL); std::string progressFile = "/CMakeFiles/progress.marks"; std::string progressFileNameFull = this->ConvertToFullPath(progressFile); progCmd << " " - << this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(progressFileNameFull), - cmOutputConverter::SHELL); + << this->ConvertToOutputFormat(progressFileNameFull, + cmOutputConverter::SHELL); commands.push_back(progCmd.str()); } std::string mf2Dir = "CMakeFiles/Makefile2"; @@ -1651,8 +1644,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( { std::ostringstream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 - progCmd << this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL); + progCmd << this->ConvertToOutputFormat(progressDir, + cmOutputConverter::SHELL); progCmd << " 0"; commands.push_back(progCmd.str()); } |