MCPcopy Create free account
hub / github.com/Kitware/CMake / ProcessHandler

Method ProcessHandler

Source/CTest/cmCTestBuildHandler.cxx:250–459  ·  view source on GitHub ↗

clearly it would be nice if this were broken up into a few smaller functions and commented...

Source from the content-addressed store, hash-verified

248// clearly it would be nice if this were broken up into a few smaller
249// functions and commented...
250int cmCTestBuildHandler::ProcessHandler()
251{
252 cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Build project" << std::endl,
253 this->Quiet);
254
255 // do we have time for this
256 if (this->CTest->GetRemainingTimeAllowed() < std::chrono::minutes(2)) {
257 return 0;
258 }
259
260 int entry;
261 for (entry = 0; cmCTestWarningErrorFileLine[entry].RegularExpressionString;
262 ++entry) {
263 cmCTestBuildHandler::cmCTestCompileErrorWarningRex r;
264 if (r.RegularExpression.compile(
265 cmCTestWarningErrorFileLine[entry].RegularExpressionString)) {
266 r.FileIndex = cmCTestWarningErrorFileLine[entry].FileIndex;
267 r.LineIndex = cmCTestWarningErrorFileLine[entry].LineIndex;
268 this->ErrorWarningFileLineRegex.push_back(std::move(r));
269 } else {
270 cmCTestLog(
271 this->CTest, ERROR_MESSAGE,
272 "Problem Compiling regular expression: "
273 << cmCTestWarningErrorFileLine[entry].RegularExpressionString
274 << std::endl);
275 }
276 }
277
278 // Determine build command and build directory
279 std::string makeCommand = this->GetMakeCommand();
280 if (makeCommand.empty()) {
281 cmCTestLog(this->CTest, ERROR_MESSAGE,
282 "Cannot find MakeCommand key in the DartConfiguration.tcl"
283 << std::endl);
284 return -1;
285 }
286
287 std::string const& buildDirectory =
288 this->CTest->GetCTestConfiguration("BuildDirectory");
289 if (buildDirectory.empty()) {
290 cmCTestLog(this->CTest, ERROR_MESSAGE,
291 "Cannot find BuildDirectory key in the DartConfiguration.tcl"
292 << std::endl);
293 return -1;
294 }
295
296 std::string const& useLaunchers =
297 this->CTest->GetCTestConfiguration("UseLaunchers");
298 this->UseCTestLaunch = cmIsOn(useLaunchers);
299
300 // Create a last build log
301 cmGeneratedFileStream ofs;
302 auto elapsed_time_start = std::chrono::steady_clock::now();
303 if (!this->StartLogFile("Build", ofs)) {
304 cmCTestLog(this->CTest, ERROR_MESSAGE,
305 "Cannot create build log file" << std::endl);
306 }
307

Callers

nothing calls this directly

Calls 15

GetMakeCommandMethod · 0.95
RunMakeCommandMethod · 0.95
GenerateXMLHeaderMethod · 0.95
GenerateXMLLaunchedMethod · 0.95
GenerateXMLLogScrapedMethod · 0.95
GenerateXMLFooterMethod · 0.95
moveFunction · 0.85
cmIsOnFunction · 0.85
compileMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected