diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2024-04-27 00:14:10 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-04-27 00:15:05 (GMT) |
commit | 2041f7c9bf0ccdf1afc1be829d00977a46f280bb (patch) | |
tree | 50a2e79c3c1c5bc570b27b474799cd31626f360b | |
parent | 051c2110c8cb7538b931075d1d712ac72789c127 (diff) | |
download | CMake-2041f7c9bf0ccdf1afc1be829d00977a46f280bb.zip CMake-2041f7c9bf0ccdf1afc1be829d00977a46f280bb.tar.gz CMake-2041f7c9bf0ccdf1afc1be829d00977a46f280bb.tar.bz2 |
cmGeneratorTarget: add the original target as a COMPILE_ONLY link
Fixes: #25909
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 94bb8e1..a2ceeb4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -8373,6 +8373,10 @@ bool cmGeneratorTarget::DiscoverSyntheticTargets(cmSyntheticTargetCache& cache, // generation. tgt->CopyImportedCxxModulesProperties(model); + tgt->AddLinkLibrary(*mf, + cmStrCat("$<COMPILE_ONLY:", model->GetName(), '>'), + GENERAL_LibraryType); + // Apply usage requirements to the target. usage.ApplyToTarget(tgt); |