[cmake-developers] Setting target properties before the target is defined ?
Brad King
brad.king at kitware.com
Wed Apr 24 09:06:50 EDT 2013
On 04/24/2013 07:14 AM, Stephen Kelly wrote:
> 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?
Yes, this sounds reasonable.
> 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.
As part of this you could make the policy validate all target names
against the genex target name recognition regex.
-Brad
More information about the cmake-developers
mailing list