| 240 | } |
| 241 | |
| 242 | void getCompatibleInterfaceProperties(cmGeneratorTarget const* target, |
| 243 | std::set<std::string>& ifaceProperties, |
| 244 | std::string const& config) |
| 245 | { |
| 246 | if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { |
| 247 | // object libraries have no link information, so nothing to compute |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | cmComputeLinkInformation* info = target->GetLinkInformation(config); |
| 252 | |
| 253 | if (!info) { |
| 254 | cmLocalGenerator* lg = target->GetLocalGenerator(); |
| 255 | std::ostringstream e; |
| 256 | e << "Exporting the target \"" << target->GetName() |
| 257 | << "\" is not " |
| 258 | "allowed since its linker language cannot be determined"; |
| 259 | lg->IssueMessage(MessageType::FATAL_ERROR, e.str()); |
| 260 | return; |
| 261 | } |
| 262 | |
| 263 | cmComputeLinkInformation::ItemVector const& deps = info->GetItems(); |
| 264 | |
| 265 | for (auto const& dep : deps) { |
| 266 | if (!dep.Target || dep.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { |
| 267 | continue; |
| 268 | } |
| 269 | getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_BOOL", |
| 270 | ifaceProperties); |
| 271 | getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_STRING", |
| 272 | ifaceProperties); |
| 273 | getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_NUMBER_MIN", |
| 274 | ifaceProperties); |
| 275 | getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_NUMBER_MAX", |
| 276 | ifaceProperties); |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | void cmExportFileGenerator::PopulateCompatibleInterfaceProperties( |
no test coverage detected
searching dependent graphs…