2013/12/21 Darrell Anderson <darrella(a)hushmail.com>
All,
I ran some more testing against the cmake 2.8.12 CMP-0022 problem.
The TL;DR version:
The proposed patch partially works but needs attention. If we
refine the patch to eliminate certain errors we probably will be
able to place this entire cmake episode behind us. :-)
Try this patch... expected results are:
<cmake-2.8.12: works fine as always were
=cmake-2.8.12: no warnings; but the same LINK_ONLY-bla-bla error /* I still
can't reproduce it, but I suspect it's because of some link flags e.g. I
don't use hidden-visibility*/
cmake-2.8.12.1: no warnings; clean build.
Some my conclusions:
1. The warnings, you saw, have not a lot common with the error which leads
to FTBFS.
2. cmake-2.8.12 was a buggy release. It seems, the only widely-used distro
which still uses it is Slackware.
3. The bug is fixed in the next cmake release and there is no known
workaround for it rather that the fix (see your own link on bugzilla)
A 2 cents about the patch:
cmake_policy and cmake_required declaration won't affect includers. see
CMP0011
cmake_required added for make policy CMP0011 work as new.
Using cmake_policy is a normal and legal way to keep old code working
(without warnings) on newer versions and on the same time to make it work
on older ones.
AFAIK It's not some sort of hack, a quick fix or a deprecated syntax. It
won't break at least unless version 3 (Or I don't know when/if they are
going to break the compatibility).