On Thursday 02 May 2013, Stephen Kelly wrote:
> Brad King wrote:
> >> Having said that, would IMPORTED targets actually be good enough for all
> >> the things you list, maybe with some wrapper macros ?
> > 
> > The IMPORTED targets still need to have an IMPORTED_LOCATION that refers
> > to a real file, so they are not quite equivalent to the proposed
> > INTERFACE or ALIAS targets.  What they all share in common is the lack
> > of build-time actions.
> 
> Actually it might be useful to make it possible to do this:
> 
>  add_library(foo SHARED foo.cpp)
>  add_library(bar SHARED bar.cpp)
>  add_library(iface INTERFACE)
>  target_link_libraries(iface INTERFACE foo bar)
> 
> and have
> 
>  make iface
> 
> cause a (re)build of foo and bar if necessary. This would be in conflict
> with the idea of considering targets with double colons to be imported
> targets if the INTERFACE_LIBRARY was used in the alias pattern I described
> before.
> 
> Perhaps we could do aliasing with a target property instead?
> 
>  add_library(foo SHARED foo.cpp)
>  set_property(TARGET foo APPEND PROPERTY ALIAS_NAME KF5::foo)

Why would I want an alias ?
Doesn't that make things only more complicated ?
If I have to be flexible on the name, I can do that right now already

if(something)
  set(theTargetName KF5::foo)
else()
  set(theTargetName foo)
endif()

tll(blub ${theTargetName})


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

Reply via email to