| 89 | } |
| 90 | |
| 91 | cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg) |
| 92 | : Target(t) |
| 93 | { |
| 94 | this->Makefile = this->Target->GetMakefile(); |
| 95 | this->LocalGenerator = lg; |
| 96 | this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); |
| 97 | |
| 98 | this->GlobalGenerator->ComputeTargetObjectDirectory(this); |
| 99 | |
| 100 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 101 | t->GetIncludeDirectoriesEntries(), |
| 102 | this->IncludeDirectoriesEntries); |
| 103 | |
| 104 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 105 | t->GetCompileOptionsEntries(), |
| 106 | this->CompileOptionsEntries); |
| 107 | |
| 108 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 109 | t->GetCompileFeaturesEntries(), |
| 110 | this->CompileFeaturesEntries); |
| 111 | |
| 112 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 113 | t->GetCompileDefinitionsEntries(), |
| 114 | this->CompileDefinitionsEntries); |
| 115 | |
| 116 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 117 | t->GetLinkOptionsEntries(), |
| 118 | this->LinkOptionsEntries); |
| 119 | |
| 120 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 121 | t->GetLinkDirectoriesEntries(), |
| 122 | this->LinkDirectoriesEntries); |
| 123 | |
| 124 | CreatePropertyGeneratorExpressions(*lg->GetCMakeInstance(), |
| 125 | t->GetPrecompileHeadersEntries(), |
| 126 | this->PrecompileHeadersEntries); |
| 127 | |
| 128 | CreatePropertyGeneratorExpressions( |
| 129 | *lg->GetCMakeInstance(), t->GetSourceEntries(), this->SourceEntries, true); |
| 130 | |
| 131 | this->PolicyMap = t->GetPolicyMap(); |
| 132 | |
| 133 | // Get hard-coded linker language |
| 134 | if (this->Target->GetProperty("HAS_CXX")) { |
| 135 | this->LinkerLanguage = "CXX"; |
| 136 | } else { |
| 137 | this->LinkerLanguage = this->Target->GetSafeProperty("LINKER_LANGUAGE"); |
| 138 | } |
| 139 | |
| 140 | auto configs = |
| 141 | this->Makefile->GetGeneratorConfigs(cmMakefile::ExcludeEmptyConfig); |
| 142 | std::string build_db_languages[] = { "CXX" }; |
| 143 | for (auto const& language : build_db_languages) { |
| 144 | for (auto const& config : configs) { |
| 145 | auto bdb_path = this->BuildDatabasePath(language, config); |
| 146 | if (!bdb_path.empty()) { |
| 147 | this->Makefile->GetOrCreateGeneratedSource(bdb_path); |
| 148 | this->GetGlobalGenerator()->AddBuildDatabaseFile(language, config, |
nothing calls this directly
no test coverage detected