mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 15:32:10 +08:00
Refactor: Eliminate sequential calls to cmSystemTools::Stdout
This commit is contained in:
@@ -202,9 +202,7 @@ bool RunCommand(std::string command, std::string& output, int& retVal,
|
|||||||
# endif
|
# endif
|
||||||
command = commandInDir;
|
command = commandInDir;
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
cmSystemTools::Stdout("running ");
|
cmSystemTools::Stdout(cmStrCat("running ", command, '\n'));
|
||||||
cmSystemTools::Stdout(command);
|
|
||||||
cmSystemTools::Stdout("\n");
|
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
@@ -153,7 +153,7 @@ void InstallScript::start(cm::uv_loop_ptr& loop,
|
|||||||
|
|
||||||
void InstallScript::printResult(std::size_t n, std::size_t total)
|
void InstallScript::printResult(std::size_t n, std::size_t total)
|
||||||
{
|
{
|
||||||
cmSystemTools::Stdout(cmStrCat("[", n, "/", total, "] ", this->name, "\n"));
|
cmSystemTools::Stdout(cmStrCat('[', n, '/', total, "] ", this->name, '\n'));
|
||||||
for (auto const& line : this->output) {
|
for (auto const& line : this->output) {
|
||||||
cmSystemTools::Stdout(line);
|
cmSystemTools::Stdout(line);
|
||||||
}
|
}
|
||||||
|
@@ -2140,15 +2140,14 @@ bool extract_tar(const std::string& outFileName,
|
|||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
if (extract) {
|
if (extract) {
|
||||||
cmSystemTools::Stdout("x ");
|
cmSystemTools::Stdout(
|
||||||
cmSystemTools::Stdout(cm_archive_entry_pathname(entry));
|
cmStrCat("x ", cm_archive_entry_pathname(entry)));
|
||||||
} else {
|
} else {
|
||||||
list_item_verbose(stdout, entry);
|
list_item_verbose(stdout, entry);
|
||||||
}
|
}
|
||||||
cmSystemTools::Stdout("\n");
|
cmSystemTools::Stdout("\n");
|
||||||
} else if (!extract) {
|
} else if (!extract) {
|
||||||
cmSystemTools::Stdout(cm_archive_entry_pathname(entry));
|
cmSystemTools::Stdout(cmStrCat(cm_archive_entry_pathname(entry), '\n'));
|
||||||
cmSystemTools::Stdout("\n");
|
|
||||||
}
|
}
|
||||||
if (extract) {
|
if (extract) {
|
||||||
if (extractTimestamps == cmSystemTools::cmTarExtractTimestamps::Yes) {
|
if (extractTimestamps == cmSystemTools::cmTarExtractTimestamps::Yes) {
|
||||||
|
Reference in New Issue
Block a user