Currently if one calls target_link_libraries(staticLib PRIVATE myLib) the implementation of target_link_libraries ensures to also add a $<LINK_ONLY:myLib> on staticLib’s INTERFACE_LINK_LIBRARIES.
Should the same be done for link options as well, given that link options don’t make sense / are not used when archiving a static library?
Right. I couldn’t find relevant mentions of the behaviour in the docs of target_link_options / target_link_libraries and the associated properties
My test project was setting 3.14 as the minimum version.
Increasing the cmake minimum version which enables the policy does indeed propagate the link options.
Thanks!