fix cmake policy warnings
Merge pull request #2243 from ZappoMan/fix_cmake_policy_warning

fix cmake policy warnings