浏览代码

cmCommonTargetGenerator: also consider synthetic targets

Ben Boeckel 2 年之前
父节点
当前提交
bde9d4ad01
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Source/cmCommonTargetGenerator.cxx

+ 3 - 1
Source/cmCommonTargetGenerator.cxx

@@ -176,7 +176,9 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
           // We can ignore the INTERFACE_LIBRARY items because
           // Target->GetLinkInformation already processed their
           // link interface and they don't have any output themselves.
-          && linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
+          && (linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY
+              // Synthesized targets may have relevant rules.
+              || linkee->IsSynthetic()) &&
           ((lang == "CXX"_s && linkee->HaveCxx20ModuleSources()) ||
            (lang == "Fortran"_s && linkee->HaveFortranSources(config))) &&
           emitted.insert(linkee).second) {