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

Function IsSettableProperty

Source/cmTarget.cxx:2048–2078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2046};
2047
2048bool IsSettableProperty(cmMakefile* context, cmTarget* target,
2049 std::string const& prop)
2050{
2051 using ROC = ReadOnlyCondition;
2052 static std::unordered_map<std::string, ReadOnlyProperty> const readOnlyProps{
2053 { "EXPORT_NAME", { ROC::Imported } },
2054 { "HEADER_SETS", { ROC::All } },
2055 { "IMPORTED_GLOBAL", { ROC::NonImported } },
2056 { "INTERFACE_HEADER_SETS", { ROC::All } },
2057 { "MANUALLY_ADDED_DEPENDENCIES", { ROC::All } },
2058 { "NAME", { ROC::All } },
2059 { "SOURCES", { ROC::Imported } },
2060 { "SYMBOLIC", { ROC::All } },
2061 { "TYPE", { ROC::All } },
2062 { "ALIAS_GLOBAL", { ROC::All, cmPolicies::CMP0160 } },
2063 { "BINARY_DIR", { ROC::All, cmPolicies::CMP0160 } },
2064 { "CXX_MODULE_SETS", { ROC::All, cmPolicies::CMP0160 } },
2065 { "IMPORTED", { ROC::All, cmPolicies::CMP0160 } },
2066 { "INTERFACE_CXX_MODULE_SETS", { ROC::All, cmPolicies::CMP0160 } },
2067 { "LOCATION", { ROC::All, cmPolicies::CMP0160 } },
2068 { "LOCATION_CONFIG", { ROC::All, cmPolicies::CMP0160 } },
2069 { "SOURCE_DIR", { ROC::All, cmPolicies::CMP0160 } }
2070 };
2071
2072 auto it = readOnlyProps.find(prop);
2073
2074 if (it != readOnlyProps.end()) {
2075 return !(it->second.isReadOnly(prop, context, target));
2076 }
2077 return true;
2078}
2079}
2080
2081void cmTarget::SetSymbolic(bool const value)

Callers 2

SetPropertyMethod · 0.85
AppendPropertyMethod · 0.85

Calls 3

isReadOnlyMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…