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

Function HandleIsAbsoluteCommand

Source/cmCMakePathCommand.cxx:792–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792bool HandleIsAbsoluteCommand(std::vector<std::string> const& args,
793 cmExecutionStatus& status)
794{
795 if (args.size() != 3) {
796 status.SetError("IS_ABSOLUTE must be called with two arguments.");
797 return false;
798 }
799
800 std::string inputPath;
801 if (!getInputPath(args[1], status, inputPath)) {
802 return false;
803 }
804
805 if (args[2].empty()) {
806 status.SetError("Invalid name for output variable.");
807 return false;
808 }
809
810 bool isAbsolute = cmCMakePath(inputPath).IsAbsolute();
811
812 status.GetMakefile().AddDefinitionBool(args[2], isAbsolute);
813
814 return true;
815}
816
817bool HandleIsRelativeCommand(std::vector<std::string> const& args,
818 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 8

getInputPathFunction · 0.85
cmCMakePathClass · 0.85
IsAbsoluteMethod · 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…