Commit Graph

2 Commits

Author SHA1 Message Date
Robert Maynard
c87004fdc3 COMPILE_ONLY: Genex now stops object libraries from linking
Previously we didn't properly exclude $<COMPILE_ONLY:OBJECT lib>
from the right hand side of  `target_link_libraries`.

Fix the update that commit 73337cb383 (LINK_LIBRARIES: Evaluate
separately for linking and usage requirements, 2022-03-22,
v3.24.0-rc1~404^2~2) made to `AddObjectEntries`.

Fixes: #26642
2025-01-28 10:01:00 -05:00
Robert Maynard
c42630ee62 cmGeneratorExpressionNode: implement COMPILE_ONLY genex
This generator expression is the inverse of `LINK_ONLY` and only coveys
usage requirements for the purposes of compilation. Its intended use is
to avoid needing to export targets that do not have link usage
requirements (e.g., header-only libraries) when used by another target.

See: #15415
2023-05-04 09:39:06 -04:00