| 170 | } |
| 171 | } |
| 172 | std::string Choose() |
| 173 | { |
| 174 | if (this->Preferred.empty()) { |
| 175 | return ""; |
| 176 | } |
| 177 | if (this->Preferred.size() > 1) { |
| 178 | std::ostringstream e; |
| 179 | e << "Target " << this->Target->GetName() |
| 180 | << " contains multiple languages with the highest linker preference" |
| 181 | << " (" << this->Preference << "):\n"; |
| 182 | for (std::string const& li : this->Preferred) { |
| 183 | e << " " << li << "\n"; |
| 184 | } |
| 185 | e << "Set the LINKER_LANGUAGE property for this target."; |
| 186 | cmake* cm = this->Target->GetLocalGenerator()->GetCMakeInstance(); |
| 187 | cm->IssueMessage(MessageType::FATAL_ERROR, e.str(), |
| 188 | this->Target->GetBacktrace()); |
| 189 | } |
| 190 | return *this->Preferred.begin(); |
| 191 | } |
| 192 | }; |
| 193 | |
| 194 | bool cmGeneratorTarget::ComputeLinkClosure(std::string const& config, |
no test coverage detected