| 206 | } |
| 207 | |
| 208 | void cmExportBuildFileGenerator::ComplainAboutMissingTarget( |
| 209 | cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee, |
| 210 | ExportInfo const& exportInfo) const |
| 211 | { |
| 212 | std::ostringstream e; |
| 213 | e << "export called with target \"" << depender->GetName() |
| 214 | << "\" which requires target \"" << dependee->GetName() << "\" "; |
| 215 | if (exportInfo.Sets.empty()) { |
| 216 | e << "that is not in any export set."; |
| 217 | } else { |
| 218 | if (exportInfo.Sets.size() == 1) { |
| 219 | e << "that is not in this export set, but in another export set which " |
| 220 | "is " |
| 221 | "exported multiple times with different namespaces: "; |
| 222 | } else { |
| 223 | e << "that is not in this export set, but in multiple other export " |
| 224 | "sets: "; |
| 225 | } |
| 226 | e << cmJoin(exportInfo.Files, ", ") << ".\n" |
| 227 | << "An exported target cannot depend upon another target which is " |
| 228 | "exported in more than one export set or with more than one " |
| 229 | "namespace. Consider consolidating the exports of the \"" |
| 230 | << dependee->GetName() << "\" target to a single export."; |
| 231 | } |
| 232 | |
| 233 | this->ReportError(e.str()); |
| 234 | } |
| 235 | |
| 236 | void cmExportBuildFileGenerator::ComplainAboutDuplicateTarget( |
| 237 | std::string const& targetName) const |
no test coverage detected