[CMake] cmake 2.6.3 RC 11
Brad King
brad.king at kitware.com
Fri Feb 6 10:04:38 EST 2009
Alexander Neundorf wrote:
> On Thursday 05 February 2009, Bill Hoffman wrote:
>> I have a release candidate (RC 11) for 2.6.3 ready for CMake.
>>
>> This should be about the last one. At this point I am only going to fix
>> regressions from previous releases of CMake into 2.6.3, so please try
>> this release.
>
> I'm running it right now on kdelibs.
>
> I noticed one thing.
> I get now the warning about CMP0011 not being set, which is the policy which
> deals with the scope of cmake_policy(SET ...). This warning appears for
> FindKDE4Internal.cmake, since this sets up the policies for KDE4.
> In FindKDE4Internal.cmake there is:
>
> cmake_policy(VERSION 2.4.5)
>
> Doesn't this imply
> cmake_policy(SET CMP0011 OLD) ?
>
> Why do I get the warning then ?
> Should the file which does
> find_package(KDE4)
> , which ends up in FindKDE4Internal.cmake, set this policy before ?
>
> Then every KDE developer would have to remember to do
> cmake_policy(SET CMP0011 OLD) at the top level of his CMakeLists.txt,
> otherwise he gets this big warning.
> I don't think it is reasonable to expect that every developer knows the policy
> scoping details good enough to understand this and to remember this.
Policy version 2.4.5 would leave CMP0011 *unset* which causes the old
behavior with a warning. See my recent response to Alan Irwin.
To support KDE's use case I delay the warning until after the include or
find_package line has been processed. You need to set it in the same
place you set CMP0003 and the others. Remember, I told you during the
design discussion for this that you would need to add the code
if(POLICY CMP0011)
cmake_policy(SET CMP0011 OLD) # or NEW
endif(POLICY CMP0011)
-Brad
More information about the CMake
mailing list