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

Function HandleAppendCommand

Source/cmCMakePathCommand.cxx:249–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249bool HandleAppendCommand(std::vector<std::string> const& args,
250 cmExecutionStatus& status)
251{
252 if (args[1].empty()) {
253 status.SetError("Invalid name for path variable.");
254 return false;
255 }
256
257 static OutputVariableParser const parser{};
258
259 auto const arguments = parser.Parse(args);
260
261 if (arguments.MaybeReportError(status.GetMakefile())) {
262 return true;
263 }
264
265 cmCMakePath path(status.GetMakefile().GetSafeDefinition(args[1]));
266 for (auto const& input : parser.GetInputs()) {
267 path /= input;
268 }
269
270 status.GetMakefile().AddDefinition(
271 arguments.Output ? *arguments.Output : args[1], path.String());
272
273 return true;
274}
275
276bool HandleAppendStringCommand(std::vector<std::string> const& args,
277 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 7

MaybeReportErrorMethod · 0.80
emptyMethod · 0.45
SetErrorMethod · 0.45
ParseMethod · 0.45
GetMakefileMethod · 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…