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

Alexander Shukaev cmake at Alexander.Shukaev.name
Sat Jun 18 07:28:30 EDT 2016


On 06/18/2016 01:15 PM, Nils Gladitz wrote:
> 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

But they in fact do.  How come?


More information about the CMake mailing list