From 5261af94248153b66d30504bd67e288c25aad7f1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 16 Feb 2024 08:42:57 -0500 Subject: cmGeneratorTarget: store synthetic targets in its cache The synthetic target cache was never actually updated, so record them in the cache so that reuses can actually be discovered. Fixes: #25568 --- Source/cmGeneratorTarget.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5b7f526..3cfa5a9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -8379,6 +8379,7 @@ bool cmGeneratorTarget::DiscoverSyntheticTargets(cmSyntheticTargetCache& cache, // Create the generator target and attach it to the local generator. auto gtp = cm::make_unique(tgt, lg); synthDep = gtp.get(); + cache.CxxModuleTargets[targetName] = synthDep; lg->AddGeneratorTarget(std::move(gtp)); } else { synthDep = cached->second; -- cgit v0.12