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

Function HandleAppendStringCommand

Source/cmCMakePathCommand.cxx:276–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276bool HandleAppendStringCommand(std::vector<std::string> const& args,
277 cmExecutionStatus& status)
278{
279 static OutputVariableParser const parser{};
280
281 auto const arguments = parser.Parse(args);
282
283 if (arguments.MaybeReportError(status.GetMakefile())) {
284 return true;
285 }
286
287 std::string inputPath;
288 if (!getInputPath(args[1], status, inputPath)) {
289 return false;
290 }
291
292 cmCMakePath path(inputPath);
293 for (auto const& input : parser.GetInputs()) {
294 path += input;
295 }
296
297 status.GetMakefile().AddDefinition(
298 arguments.Output ? *arguments.Output : args[1], path.String());
299
300 return true;
301}
302
303bool HandleRemoveFilenameCommand(std::vector<std::string> const& args,
304 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 6

getInputPathFunction · 0.85
MaybeReportErrorMethod · 0.80
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…