mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
cmLocalUnixMakefileGenerator3: Simplify progress command generation
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <sstream>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <cm/memory>
|
#include <cm/memory>
|
||||||
@@ -1733,33 +1732,24 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|||||||
depends.emplace_back("cmake_check_build_system");
|
depends.emplace_back("cmake_check_build_system");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string progressDir =
|
std::string const progressDir = this->ConvertToOutputFormat(
|
||||||
cmStrCat(this->GetBinaryDirectory(), "/CMakeFiles");
|
cmStrCat(this->GetBinaryDirectory(), "/CMakeFiles"),
|
||||||
{
|
cmOutputConverter::SHELL);
|
||||||
std::ostringstream progCmd;
|
std::string const progressMarks = this->ConvertToOutputFormat(
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
this->ConvertToFullPath("/CMakeFiles/progress.marks"),
|
||||||
progCmd << this->ConvertToOutputFormat(progressDir,
|
cmOutputConverter::SHELL);
|
||||||
cmOutputConverter::SHELL);
|
std::string const progressStartCommand =
|
||||||
|
cmStrCat("$(CMAKE_COMMAND) -E cmake_progress_start ", progressDir, ' ',
|
||||||
|
progressMarks);
|
||||||
|
std::string const progressFinishCommand =
|
||||||
|
cmStrCat("$(CMAKE_COMMAND) -E cmake_progress_start ", progressDir, " 0");
|
||||||
|
|
||||||
std::string progressFile = "/CMakeFiles/progress.marks";
|
commands.emplace_back(progressStartCommand);
|
||||||
std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
|
|
||||||
progCmd << " "
|
|
||||||
<< this->ConvertToOutputFormat(progressFileNameFull,
|
|
||||||
cmOutputConverter::SHELL);
|
|
||||||
commands.push_back(progCmd.str());
|
|
||||||
}
|
|
||||||
std::string mf2Dir = "CMakeFiles/Makefile2";
|
std::string mf2Dir = "CMakeFiles/Makefile2";
|
||||||
commands.push_back(this->GetRecursiveMakeCall(mf2Dir, recursiveTarget));
|
commands.push_back(this->GetRecursiveMakeCall(mf2Dir, recursiveTarget));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
this->GetCurrentBinaryDirectory());
|
this->GetCurrentBinaryDirectory());
|
||||||
{
|
commands.emplace_back(progressFinishCommand);
|
||||||
std::ostringstream progCmd;
|
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
|
||||||
progCmd << this->ConvertToOutputFormat(progressDir,
|
|
||||||
cmOutputConverter::SHELL);
|
|
||||||
progCmd << " 0";
|
|
||||||
commands.push_back(progCmd.str());
|
|
||||||
}
|
|
||||||
this->WriteMakeRule(ruleFileStream, "The main all target", "all", depends,
|
this->WriteMakeRule(ruleFileStream, "The main all target", "all", depends,
|
||||||
commands, true);
|
commands, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user