On Tuesday 18 December 2012, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> > On Tuesday 18 December 2012, Stephen Kelly wrote:
> >> Alexander Neundorf wrote:
> >> > This would have the same effect, but people could simply hide the
> >> > USE_INTERFACES keyword in a variable:
> >> > set(Foo_LIBRARIES USE_INTERFACES Foo::FooLib)
> >> >
> >> > and then it's again hidden:
> >> > target_link_libraries(hello ${JPEG_LIBRARIES} ${Foo_LIBRARIES})
> >>
> >> I don't see why anyone would do that.
> >
> > A buildsystem maintainer might decide that he simply wants to provide the
> > normal Foo_LIBRARIES variable to its users, so they can simply continue
> > to use it as they always did, and don't have to care about the new cmake
> > features. I don't say whether that's a good or bad idea, but it's
> > possible and IMO not too far fetched.
>
> I'd certainly claim it's a bad idea :).
>
> The upstream buildsystem maintainer has no idea whether Foo should appear
> in the INTERFACE of targets that use it. It's a very bad idea.
I'm talking about a downstream buildsystem maintainer, of some application
with a handful of known developers.
He might write a FindFoo.cmake or create an ExternalProject for Foo, and he
might decide that he'll simply create a FOO_LIBRARIES variable, so "his"
developers don't have to care about imported targets.
But, actually we agree :-)
I just wanted to show that by using a keyword for tll() this is possible (but
would be a bad idea), and by using a separate command, this is not possible.
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