CMAKE_POLICY_WARNING_CMP0116 set to false does not prevent warning
According to the documentation for CMAKE_POLICY_WARNING_CMP<NNNN>
, setting CMAKE_POLICY_WARNING_CMP0116
to false should prevent that policy warning. CMP0116 is one of the policies listed that the variable should apply to. Even with this set to false though, the warnings are still emitted.
That documentation is also inaccurate in the case of CMP0116, since it will warn by default but the variable says the policies it applies to are only for policies that do not warn by default. Given that CMP0116 is an overly conservative policy that warns even in cases where it may not be needed (see #21959 (closed)), we really want users to be able to use CMAKE_POLICY_WARNING_CMP0116
to turn off that warning where they know it isn't a problem.