Brad King wrote: > On 02/11/2014 08:46 AM, Stephen Kelly wrote: >> We could consider making the LINK_ONLY generator expression public in >> order to allow the user to decide the granularity here (possibly >> encapsulated in a INTERFACE_LIBRARY). > > For reference, without the interface target it is as simple as: > > target_link_libraries(staticB $<LINK_ONLY:staticA>) > > Do we have any enforcement for $<LINK_ONLY> to be used only with > static libraries?
Yes. cmTarget::GetTransitivePropertyLinkLibraries ensures that it is only effective for static libraries because only there dagChecker.SetTransitivePropertiesOnly(); is called. It might be possible to refactor that. > Is there any reason not to allow it for all > library types? It looks like a way to suppress usage requirements > specified by a package but that the consuming project does not > want for some reason. Yes. When we introduced it (part of CMP0022 I think), we decided to keep it internal for now. I can look into generalizing it a bit after 3.0.0. Thanks, Steve. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers