mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-28 04:09:35 +03: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