On Thursday 28 February 2013, Stephen Kelly wrote: > Brad King wrote: > > On 02/27/2013 04:37 PM, Alexander Neundorf wrote: > >> 1) we should continue to recommend to use the variables (which will now > >> be set to the name of the target). In case of typos, this will lead to > >> an empty variable (as it did before with Find-modules), and undefined > >> references when linking. This is at least no regression. > >> Also, it shields users somewhat from potential renaming of the imported > >> targets. > > > > This is up to individual projects based on their own requirements. > > Some interface may be more stable than others. I do not think any > > general recommendation can be made without lots of contingencies. > > > >> safe_target_link_libraries(hello TARGET:foox > >> > >> FILE:/opt/lib/libbar.a > >> LIBRARY:png) > > > > Sure, it is possible to make interfaces typo-resistant by adding lots > > of syntax. Part of the simplicity tll() is that it has little syntax. > > > > Note that FILE: and LIBRARY: do not need to be distinguished from > > one another because files always have paths (/) and library names > > never do. For TARGET: we already have $<TARGET_NAME:foox>, which > > IIUC can be used in tll already (Steve?). > > That works, but it doesn't check anything. Checking is only done at export- > time (though it could also check for existence at generate time).
So if I would do (I don't plan to) target_link_libraries(foo <TARGET_NAME:png> ) it would not check that there is a target named "png" ? Alex -- 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
