diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmProcess.cxx | 21 | ||||
-rw-r--r-- | Source/CTest/cmProcess.h | 1 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 2 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 6 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 9 |
6 files changed, 31 insertions, 16 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index cdf899c497..6097aa5bdd 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -249,7 +249,7 @@ void cmProcess::OnRead(ssize_t nread, const uv_buf_t* buf) this->PipeReader.reset(); if (this->ProcessHandleClosed) { uv_timer_stop(this->Timer); - this->Runner.FinalizeTest(); + this->Finish(); } } @@ -291,7 +291,7 @@ void cmProcess::OnTimeout() // Our on-exit handler already ran but did not finish the test // because we were still reading output. We've just dropped // our read handler, so we need to finish the test now. - this->Runner.FinalizeTest(); + this->Finish(); } } @@ -321,6 +321,16 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal) // Record exit information. this->ExitValue = exit_status; this->Signal = term_signal; + + this->ProcessHandleClosed = true; + if (this->ReadHandleClosed) { + uv_timer_stop(this->Timer); + this->Finish(); + } +} + +void cmProcess::Finish() +{ this->TotalTime = std::chrono::steady_clock::now() - this->StartTime; // Because of a processor clock scew the runtime may become slightly // negative. If someone changed the system clock while the process was @@ -329,12 +339,7 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal) if (this->TotalTime <= cmDuration::zero()) { this->TotalTime = cmDuration::zero(); } - - this->ProcessHandleClosed = true; - if (this->ReadHandleClosed) { - uv_timer_stop(this->Timer); - this->Runner.FinalizeTest(); - } + this->Runner.FinalizeTest(); } cmProcess::State cmProcess::GetProcessStatus() diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 2c24f2df02..ea72a26506 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -101,6 +101,7 @@ private: void OnAllocate(size_t suggested_size, uv_buf_t* buf); void StartTimer(); + void Finish(); class Buffer : public std::vector<char> { diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 3b5dc042f1..a9089e52f2 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -486,7 +486,7 @@ void QCMake::setWarnUnusedMode(bool value) void QCMake::checkOpenPossible() { - auto data = this->BinaryDirectory.toLocal8Bit().data(); + std::string data = this->BinaryDirectory.toLocal8Bit().data(); auto possible = this->CMakeInstance->Open(data, true); emit openPossible(possible); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cf6802db76..00ad62e8a3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2429,11 +2429,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target) } for (std::string const& config : configsList) { - const std::string buildType = cmSystemTools::UpperCase(config); - // FIXME: Refactor collection of sources to not evaluate object libraries. std::vector<cmSourceFile*> sources; - target->GetSourceFiles(sources, buildType); + target->GetSourceFiles(sources, config); for (const std::string& lang : { "C", "CXX", "OBJC", "OBJCXX" }) { auto langSources = std::count_if( @@ -2602,15 +2600,13 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target) config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); } - const std::string buildType = cmSystemTools::UpperCase(config); - std::string filename_base = cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/", target->GetName(), ".dir/Unity/"); // FIXME: Refactor collection of sources to not evaluate object libraries. std::vector<cmSourceFile*> sources; - target->GetSourceFiles(sources, buildType); + target->GetSourceFiles(sources, config); auto batchSizeString = target->GetProperty("UNITY_BUILD_BATCH_SIZE"); const size_t unityBatchSize = diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 63c6680b1f..24a635183a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -728,6 +728,10 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop( ; /* clang-format on */ } else { + makefileStream << "# Command-line flag to silence nested $(MAKE).\n" + "$(VERBOSE)MAKESILENT = -s\n" + "\n"; + // Write special target to silence make output. This must be after // the default target in case VERBOSE is set (which changes the // name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a @@ -1925,7 +1929,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( { // Call make on the given file. std::string cmd = cmStrCat( - "$(MAKE) -f ", + "$(MAKE) $(MAKESILENT) -f ", this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL), ' '); cmGlobalUnixMakefileGenerator3* gg = diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 7eeb97f255..2bccbc7621 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1697,6 +1697,11 @@ int cmcmd::RunPreprocessor(const std::vector<std::string>& command, } auto status = process.GetStatus(); if (!status[0] || status[0]->ExitStatus != 0) { + auto errorStream = process.ErrorStream(); + if (errorStream) { + std::cerr << errorStream->rdbuf(); + } + return 1; } @@ -1765,6 +1770,10 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args) } auto status = process.GetStatus(); if (!status[0] || status[0]->ExitStatus != 0) { + auto errorStream = process.ErrorStream(); + if (errorStream) { + std::cerr << errorStream->rdbuf(); + } return 1; } |