From bde9d4ad014bd93181281fdfc2262d84ac9fd487 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 31 Jan 2023 22:46:25 -0500 Subject: cmCommonTargetGenerator: also consider synthetic targets --- Source/cmCommonTargetGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index a63c162..1705763 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -176,7 +176,9 @@ std::vector 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) { -- cgit v0.12