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

Alexander Shukaev cmake at Alexander.Shukaev.name
Sat Jun 18 05:38:27 EDT 2016


On 06/18/2016 11:02 AM, Nils Gladitz wrote:
> On 18.06.2016 09:34, Alexander Shukaev wrote:
>> Hello,
>>
>> CMake 3.5.2 here.  Why explicitly setting the CMP0063 policy to NEW
>> does not suppress the warning and actually use that new policy?  That is
>>
>> if(POLICY CMP0063)
>>   cmake_policy(SET CMP0063 NEW)
>> endif()
>>
>> and I still get
>>
>>   Policy CMP0063 is not set: Honor visibility properties for all target
>>   types.  Run "cmake --help-policy CMP0063" for policy details. Use the
>>   cmake_policy command to set the policy and suppress this warning.
>
> Did you call cmake_minimum_required(VERSION) after setting that policy?
> That would reset all policies based on the requested version.
>
> Otherwise did you set the policy before creating your targets and in a
> scope that is parent to all targets involved?
>
> Nils

I did try both variants, after and before

cmake_minimum_required(VERSION)

but the result is the same.  The scope is for sure parent to targets.

Alexander


More information about the CMake mailing list