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

Function HandleGlobalMode

Source/cmSetPropertyCommand.cxx:637–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635
636namespace /* anonymous */ {
637bool HandleGlobalMode(cmExecutionStatus& status,
638 std::set<std::string> const& names,
639 std::string const& propertyName,
640 std::string const& propertyValue, bool appendAsString,
641 bool appendMode, bool remove)
642{
643 if (!names.empty()) {
644 status.SetError("given names for GLOBAL scope.");
645 return false;
646 }
647
648 // Set or append the property.
649 cmake* cm = status.GetMakefile().GetCMakeInstance();
650 if (appendMode) {
651 cm->AppendProperty(propertyName, propertyValue, appendAsString);
652 } else {
653 if (remove) {
654 cm->SetProperty(propertyName, nullptr);
655 } else {
656 cm->SetProperty(propertyName, propertyValue);
657 }
658 }
659
660 return true;
661}
662
663bool HandleDirectoryMode(cmExecutionStatus& status,
664 std::set<std::string> const& names,

Callers 1

cmSetPropertyCommandFunction · 0.70

Calls 6

emptyMethod · 0.45
SetErrorMethod · 0.45
GetCMakeInstanceMethod · 0.45
GetMakefileMethod · 0.45
AppendPropertyMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…