On 2019 M02 12, Tue 08:02:43 CET Starka Tomáš wrote:
> tldr;
> It would be wonderful to have function or signature for
> target_link_libraries tha would link only to a targets. Did I overlook
> something?
> 
> like target_link_libraries(name [PUBLIC...] TARGETS myFavouriteLib ...
> QUIET/VERBOSE)
> 
...
> But then I guess it wouldn't hurt to have something like
> target_link_libraries(name [PUBLIC...] TARGETS myFavouriteLib ...
> QUIET/VERBOSE) which would not try to give linker myFavouriteLib.lib
> if there was no target of that name in question. Or
> target_link_targets... realy doesn't matter as long as it does that
> and maybe when asked by the last parameter it gives an error if the
> one of the target is non-existent or ill-formed. 

I agree to target_link_targets().
Additionally I would prefer if (maybe with a policy) include directories would 
be only applied when using target_link_targets(), but not when using 
target_link_libraries().
This would make it more obvious IMO.

Alex

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to