mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
cmGeneratorTarget: add the original target as a COMPILE_ONLY link
Fixes: #25909
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user