| 132 | } |
| 133 | |
| 134 | void cmExportBuildFileGenerator::HandleMissingTarget( |
| 135 | std::string& link_libs, cmGeneratorTarget const* depender, |
| 136 | cmGeneratorTarget* dependee) |
| 137 | { |
| 138 | // The target is not in the export. |
| 139 | if (!this->AppendMode) { |
| 140 | auto const& exportInfo = this->FindExportInfo(dependee); |
| 141 | |
| 142 | if (exportInfo.Namespaces.size() == 1 && exportInfo.Sets.size() == 1) { |
| 143 | std::string missingTarget = *exportInfo.Namespaces.begin(); |
| 144 | |
| 145 | missingTarget += dependee->GetExportName(); |
| 146 | link_libs += missingTarget; |
| 147 | this->MissingTargets.emplace_back(std::move(missingTarget)); |
| 148 | return; |
| 149 | } |
| 150 | // We are not appending, so all exported targets should be |
| 151 | // known here. This is probably user-error. |
| 152 | this->ComplainAboutMissingTarget(depender, dependee, exportInfo); |
| 153 | } |
| 154 | // Assume the target will be exported by another command. |
| 155 | // Append it with the export namespace. |
| 156 | link_libs += this->Namespace; |
| 157 | link_libs += dependee->GetExportName(); |
| 158 | } |
| 159 | |
| 160 | void cmExportBuildFileGenerator::GetTargets( |
| 161 | std::vector<TargetExport>& targets) const |
no test coverage detected