| 540 | } |
| 541 | |
| 542 | void PopulateImportedTarget(cmTarget& target, MetaDataProperties const& props, |
| 543 | cmCxxModuleMetadata const& meta, |
| 544 | std::vector<std::string> const& configs) |
| 545 | { |
| 546 | if (!props.AllIncludeDirectories.empty()) { |
| 547 | target.SetProperty("IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES", |
| 548 | cmJoin(props.AllIncludeDirectories, ";")); |
| 549 | } |
| 550 | |
| 551 | if (!props.AllCompileDefinitions.empty()) { |
| 552 | target.SetProperty("IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS", |
| 553 | cmJoin(props.AllCompileDefinitions, ";")); |
| 554 | } |
| 555 | |
| 556 | if (!props.AllCompileOptions.empty()) { |
| 557 | target.SetProperty("IMPORTED_CXX_MODULES_COMPILE_OPTIONS", |
| 558 | cmJoin(props.AllCompileOptions, ";")); |
| 559 | } |
| 560 | |
| 561 | if (!props.AllCompileFeatures.empty()) { |
| 562 | target.SetProperty("IMPORTED_CXX_MODULES_COMPILE_FEATURES", |
| 563 | cmJoin(props.AllCompileFeatures, ";")); |
| 564 | } |
| 565 | |
| 566 | for (auto const& config : configs) { |
| 567 | std::vector<std::string> moduleList; |
| 568 | for (auto const& module : meta.Modules) { |
| 569 | if (module.IsInterface) { |
| 570 | moduleList.push_back(cmStrCat(module.LogicalName, "="_s, |
| 571 | props.NormalizePath(module.SourcePath))); |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | if (!moduleList.empty()) { |
| 576 | std::string upperConfig = cmSystemTools::UpperCase(config); |
| 577 | std::string propertyName = |
| 578 | cmStrCat("IMPORTED_CXX_MODULES_"_s, upperConfig); |
| 579 | target.SetProperty(propertyName, cmJoin(moduleList, ";")); |
| 580 | } |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | } // namespace |
| 585 |
no test coverage detected
searching dependent graphs…