[CMake] CMake 2.6.0 Beta ready for testing!

Brad King brad.king at kitware.com
Fri Mar 28 13:15:02 EDT 2008


Eric Noulard wrote:
> 2008/3/28, Mathieu Malaterre <mathieu.malaterre at gmail.com>:
>>  >
>>  >  I'll recompile cmake 2.6.0 and check if recompilation fix the issue.
>>
>>
>> Setting
>>
>>  CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
>>
>>  did the trick.
> 
> Shouldn't you use CMAKE_POLICY instead
> of CMAKE_BACKWARDS_COMPATIBILITY
> 
> http://www.cmake.org/Wiki/CMake_Policies
> 
> As far as I understand it should be something like:
> 
> cmake_minimum_required(VERSION 2.4)
> if(COMMAND cmake_policy)
>    # policy settings ...
>    cmake_policy(VERSION 2.4)
> endif(COMMAND cmake_policy)
> 
> I've recently discovered CMake policy so
> my advise may be 'blind' :=)

Look at the documentation of cmake_minimum_required.  It will implicitly 
call cmake_policy(VERSION).  See documentation of policy CMP0001 for how 
compatibility with CMake 2.4 and below works.

Anyway, Mathieu's problem was about trying to load 32-bit and 64-bit 
code in the same process.

-Brad


More information about the CMake mailing list