Brad King <brad.king@...> writes:

> 
> Steve,
> 
> I think this may fall under your expertise now.  The goal is to generate
> a nice error message when an imported target's link interface depends on
> other targets that should have been imported but have not been.  Currently
> we just get a build-time link failure because the name is treated as a
> plain library name.  We'd like a generate-time error message with as much
> context as possible instead.

I was thinking about this issue recently.

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6106

It's becoming conventional to use a namespace like NS:: for imported
targets. Would it be possible to assume that if linking to something which
has double colons, then it must be an imported target, and if we can't find
such an imported target, to report an error at generate time? That would
also be an incentive to use the convention of using :: in imported targets,
and we could document it as recommended.

For makefile generators and xcode it is not possible to use create
non-imported targets in a buildsystem. On Windows it doesn't seem to be
possible either (the : is mistaken for a drive delimiter). It does currently
work with Ninja though, so a policy may be needed if it's a workable solution.

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

Reply via email to