| 1942 | } |
| 1943 | |
| 1944 | cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( |
| 1945 | std::string const& config) const |
| 1946 | { |
| 1947 | // There is no compile information for imported targets. |
| 1948 | if (this->IsImported()) { |
| 1949 | return nullptr; |
| 1950 | } |
| 1951 | |
| 1952 | if (this->GetType() > cmStateEnums::OBJECT_LIBRARY) { |
| 1953 | std::string msg = cmStrCat("cmTarget::GetCompileInfo called for ", |
| 1954 | this->GetName(), " which has type ", |
| 1955 | cmState::GetTargetTypeName(this->GetType())); |
| 1956 | this->LocalGenerator->IssueMessage(MessageType::INTERNAL_ERROR, msg); |
| 1957 | return nullptr; |
| 1958 | } |
| 1959 | |
| 1960 | // Lookup/compute/cache the compile information for this configuration. |
| 1961 | std::string config_upper; |
| 1962 | if (!config.empty()) { |
| 1963 | config_upper = cmSystemTools::UpperCase(config); |
| 1964 | } |
| 1965 | auto i = this->CompileInfoMap.find(config_upper); |
| 1966 | if (i == this->CompileInfoMap.end()) { |
| 1967 | CompileInfo info; |
| 1968 | this->ComputePDBOutputDir("COMPILE_PDB", config, info.CompilePdbDir); |
| 1969 | CompileInfoMapType::value_type entry(config_upper, info); |
| 1970 | i = this->CompileInfoMap.insert(entry).first; |
| 1971 | } |
| 1972 | return &i->second; |
| 1973 | } |
| 1974 | |
| 1975 | cmGeneratorTarget::ModuleDefinitionInfo const* |
| 1976 | cmGeneratorTarget::GetModuleDefinitionInfo(std::string const& config) const |
no test coverage detected