Use cmake_policy() in a safe way

cmake_policy() by itself raises the minimum requirement on CMake.
We want it to be optional though, so add the necessary if() around
it.
1 file changed