| 1973 | } |
| 1974 | |
| 1975 | cmGeneratorTarget::ModuleDefinitionInfo const* |
| 1976 | cmGeneratorTarget::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 | |
| 2000 | void cmGeneratorTarget::ComputeModuleDefinitionInfo( |
| 2001 | std::string const& config, ModuleDefinitionInfo& info) const |
no test coverage detected