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

Function HandleIsRelativeCommand

Source/cmCMakePathCommand.cxx:817–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815}
816
817bool HandleIsRelativeCommand(std::vector<std::string> const& args,
818 cmExecutionStatus& status)
819{
820 if (args.size() != 3) {
821 status.SetError("IS_RELATIVE must be called with two arguments.");
822 return false;
823 }
824
825 std::string inputPath;
826 if (!getInputPath(args[1], status, inputPath)) {
827 return false;
828 }
829
830 if (args[2].empty()) {
831 status.SetError("Invalid name for output variable.");
832 return false;
833 }
834
835 bool isRelative = cmCMakePath(inputPath).IsRelative();
836
837 status.GetMakefile().AddDefinitionBool(args[2], isRelative);
838
839 return true;
840}
841
842bool HandleIsPrefixCommand(std::vector<std::string> const& args,
843 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 8

getInputPathFunction · 0.85
cmCMakePathClass · 0.85
IsRelativeMethod · 0.80
AddDefinitionBoolMethod · 0.80
sizeMethod · 0.45
SetErrorMethod · 0.45
emptyMethod · 0.45
GetMakefileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…