[CMake] Suppressing policy warnings

Nils Gladitz nilsgladitz at gmail.com
Fri Aug 19 05:50:23 EDT 2016


On 08/19/2016 11:18 AM, Robert Bielik wrote:

> Hi,
>
> I'm currently using CMake 3.5.0 and I get TONS of CMP0054 policy warnings. So I set the policy:
>
> cmake_policy(SET CMP0054 OLD)
>
> in top level CMakeLists.txt file. Nothing happens. I STILL get TONS of warnings.
>
> Help ?

cmake_minimum_required(VERSION) resets all policies to match the given 
version.

So either set the policy after any cmake_minimum_required(VERSION) call,
or don't set this specific policy at all and increase your minimum 
required version to at least 3.1 (will implicitly set the policy to NEW),
or fix (work around) the ambiguities that the policy warnings point to.

Nils


More information about the CMake mailing list