[CMake] Policy CMP0063 is not set: Honor visibility properties for all target

Nils Gladitz nilsgladitz at gmail.com
Sat Jun 18 07:15:05 EDT 2016


On 18.06.2016 13:03, Alexander Shukaev wrote:
>
> if(POLICY CMP0011)
>   cmake_policy(SET CMP0011 NEW)
> endif()
> if(POLICY CMP0063)
>   cmake_policy(SET CMP0063 NEW)
> endif()
>
> CMakeLists.txt:
>
> include(xxx)
> cmake_minimum_required(VERSION 3.1.0)
>
> and it still works.  Is it because the version is high enough so it 
> does not reset policies?

The cmake_minimum_required() call will set CMP0011 to NEW and will unset 
CMP0063.
This is because CMP0011 was introduced before CMake 3.1.0 (the version 
you require) and CMP0063 was introduced afterwards (in CMake 3.3).

Given your sequence of calls none of the previous cmake_policy(SET) 
calls will have any effect.

Nils


More information about the CMake mailing list