mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Previously we always used content guarded by `$<LINK_ONLY:...>` in `LINK_LIBRARIES`, even when evaluating for non-linking usage requirements. Add a policy to honor `LINK_ONLY` in `LINK_LIBRARIES` the same way we already do in `INTERFACE_LINK_LIBRARIES`.
17 lines
283 B
C
17 lines
283 B
C
#ifdef EXPECT_FOO_LINK_ONLY
|
|
# ifndef FOO_LINK_ONLY
|
|
# error "FOO_LINK_ONLY incorrectly not defined"
|
|
# endif
|
|
#else
|
|
# ifdef FOO_LINK_ONLY
|
|
# error "FOO_LINK_ONLY incorrectly defined"
|
|
# endif
|
|
#endif
|
|
|
|
extern int foo_link_only(void);
|
|
|
|
int main(void)
|
|
{
|
|
return foo_link_only();
|
|
}
|