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

Method PopulateProperties

Source/cmExportTryCompileFileGenerator.cxx:130–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void cmExportTryCompileFileGenerator::PopulateProperties(
131 cmGeneratorTarget const* target, ImportPropertyMap& properties,
132 std::set<cmGeneratorTarget const*>& emitted)
133{
134 // Look through all non-special properties.
135 std::vector<std::string> props = target->GetPropertyKeys();
136 // Include special properties that might be relevant here.
137 props.emplace_back("INTERFACE_LINK_LIBRARIES");
138 props.emplace_back("INTERFACE_LINK_LIBRARIES_DIRECT");
139 props.emplace_back("INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE");
140 for (std::string const& p : props) {
141 cmValue v = target->GetProperty(p);
142 if (!v) {
143 continue;
144 }
145 properties[p] = *v;
146
147 if (cmHasLiteralPrefix(p, "IMPORTED_LINK_INTERFACE_LIBRARIES") ||
148 cmHasLiteralPrefix(p, "IMPORTED_LINK_DEPENDENT_LIBRARIES") ||
149 cmHasLiteralPrefix(p, "INTERFACE_LINK_LIBRARIES")) {
150 std::string evalResult =
151 this->FindTargets(p, target, std::string(), emitted);
152
153 cmList depends{ evalResult };
154 for (std::string const& li : depends) {
155 cmGeneratorTarget* tgt =
156 target->GetLocalGenerator()->FindGeneratorTargetToUse(li);
157 if (tgt && emitted.insert(tgt).second) {
158 this->Exports.push_back(tgt);
159 }
160 }
161 }
162 }
163}
164
165std::string cmExportTryCompileFileGenerator::InstallNameDir(
166 cmGeneratorTarget const* target, std::string const& config)

Callers 1

GenerateMainFileMethod · 0.95

Calls 9

FindTargetsMethod · 0.95
cmHasLiteralPrefixFunction · 0.85
emplace_backMethod · 0.80
push_backMethod · 0.80
GetPropertyKeysMethod · 0.45
GetPropertyMethod · 0.45
GetLocalGeneratorMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected