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

Function HandleInstallMode

Source/cmGetPropertyCommand.cxx:559–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557}
558
559bool HandleInstallMode(cmExecutionStatus& status, std::string const& name,
560 OutType infoType, std::string const& variable,
561 std::string const& propertyName)
562{
563 if (name.empty()) {
564 status.SetError("not given name for INSTALL scope.");
565 return false;
566 }
567
568 // Get the installed file.
569 cmake* cm = status.GetMakefile().GetCMakeInstance();
570
571 if (cmInstalledFile* file =
572 cm->GetOrCreateInstalledFile(&status.GetMakefile(), name)) {
573 std::string value;
574 bool isSet = file->GetProperty(propertyName, value);
575
576 return StoreResult(infoType, status.GetMakefile(), variable,
577 isSet ? value.c_str() : nullptr);
578 }
579 status.SetError(
580 cmStrCat("given INSTALL name that could not be found or created: ", name));
581 return false;
582}
583}

Callers 1

cmGetPropertyCommandFunction · 0.70

Calls 9

c_strMethod · 0.80
StoreResultFunction · 0.70
cmStrCatFunction · 0.70
emptyMethod · 0.45
SetErrorMethod · 0.45
GetCMakeInstanceMethod · 0.45
GetMakefileMethod · 0.45
GetPropertyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…