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

Method GetCompileInfo

Source/cmGeneratorTarget.cxx:1944–1973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1942}
1943
1944cmGeneratorTarget::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
1975cmGeneratorTarget::ModuleDefinitionInfo const*
1976cmGeneratorTarget::GetModuleDefinitionInfo(std::string const& config) const

Callers 1

Calls 10

IsImportedMethod · 0.95
GetTypeMethod · 0.95
ComputePDBOutputDirMethod · 0.95
cmStrCatFunction · 0.70
GetNameMethod · 0.45
IssueMessageMethod · 0.45
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected