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

Method GetModuleDefinitionInfo

Source/cmGeneratorTarget.cxx:1975–1998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1973}
1974
1975cmGeneratorTarget::ModuleDefinitionInfo const*
1976cmGeneratorTarget::GetModuleDefinitionInfo(std::string const& config) const
1977{
1978 // A module definition file only makes sense on certain target types.
1979 if (this->GetType() != cmStateEnums::SHARED_LIBRARY &&
1980 this->GetType() != cmStateEnums::MODULE_LIBRARY &&
1981 !this->IsExecutableWithExports()) {
1982 return nullptr;
1983 }
1984
1985 // Lookup/compute/cache the compile information for this configuration.
1986 std::string config_upper;
1987 if (!config.empty()) {
1988 config_upper = cmSystemTools::UpperCase(config);
1989 }
1990 auto i = this->ModuleDefinitionInfoMap.find(config_upper);
1991 if (i == this->ModuleDefinitionInfoMap.end()) {
1992 ModuleDefinitionInfo info;
1993 this->ComputeModuleDefinitionInfo(config, info);
1994 ModuleDefinitionInfoMapType::value_type entry(config_upper, info);
1995 i = this->ModuleDefinitionInfoMap.insert(entry).first;
1996 }
1997 return &i->second;
1998}
1999
2000void cmGeneratorTarget::ComputeModuleDefinitionInfo(
2001 std::string const& config, ModuleDefinitionInfo& info) const

Callers 11

AppendLinkDependsMethod · 0.80
GenDefFileMethod · 0.80
ComputeLinkDepsMethod · 0.80
OutputBuildToolMethod · 0.80
OutputTargetRulesMethod · 0.80
WriteLinkStatementMethod · 0.80
ComputeLinkOptionsMethod · 0.80
WriteEventsMethod · 0.80

Calls 7

GetTypeMethod · 0.95
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected