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

Function HandleNormalPathCommand

Source/cmCMakePathCommand.cxx:452–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452bool HandleNormalPathCommand(std::vector<std::string> const& args,
453 cmExecutionStatus& status)
454{
455 static OutputVariableParser const parser{};
456
457 auto const arguments = parser.Parse(args);
458
459 if (arguments.MaybeReportError(status.GetMakefile())) {
460 return true;
461 }
462
463 if (!parser.GetInputs().empty()) {
464 status.SetError("NORMAL_PATH called with unexpected arguments.");
465 return false;
466 }
467
468 std::string inputPath;
469 if (!getInputPath(args[1], status, inputPath)) {
470 return false;
471 }
472
473 auto path = cmCMakePath(inputPath).Normal();
474
475 status.GetMakefile().AddDefinition(
476 arguments.Output ? *arguments.Output : args[1], path.String());
477
478 return true;
479}
480
481bool HandleTransformPathCommand(
482 std::vector<std::string> const& args, cmExecutionStatus& status,

Callers

nothing calls this directly

Calls 10

getInputPathFunction · 0.85
cmCMakePathClass · 0.85
MaybeReportErrorMethod · 0.80
NormalMethod · 0.80
ParseMethod · 0.45
GetMakefileMethod · 0.45
emptyMethod · 0.45
SetErrorMethod · 0.45
AddDefinitionMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…