[cmake-developers] [Cmake-commits] CMake branch, next, updated. v2.8.2-557-gd77639f

David Cole david.cole at kitware.com
Thu Aug 26 15:56:00 EDT 2010


If we take the time to make it a policy, it should be a hard error.

To me, it's clearly incorrect code.

target_link_libraries takes at least 2 arguments.
- If it has less than 2, it should be an error.
- If the 1st arg does not name a target, it should be an error.

We will help people find incorrect CMakeLists code if we make this an error.
It will make CMake better to make this an error.


Just my opinion,
David C.


On Thu, Aug 26, 2010 at 3:43 PM, Alexander Neundorf <neundorf at kde.org>wrote:

> On Thursday 26 August 2010, Bill Hoffman wrote:
> > > I colleague hit this today (i.e. the code was accepted), and was
> > > surprised that cmake did not report an error on this.
> > >
> > > Instead of a warning and continuing I'd prefer a policy actually. I'd
> say
> > > it's a bug that it doesn't fail.
> >
> > It will break too much code.   If we give a warning and continue that
> > should be fine.
> > This has been allowed for 10 years so I am guessing there are lots of
> > instances of this floating around.
>
> So, no policy ?
> With a policy it would warn and continue, except when the policy is set to
> NEW, then it would  fail.
>
> Alex
> _______________________________________________
> cmake-developers mailing list
> cmake-developers at cmake.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20100826/1b65573e/attachment.html>


More information about the cmake-developers mailing list