On 04/23/2014 12:57 PM, James Bigler wrote: > I'm getting tons of CMP0043 warnings on my existing project. > > I have cmake_policy(VERSION 2.6) set in my project. > Why am I being pestered by warnings? Shouldn't I get a policy > value appropriate for 2.6 (so CMP0043 should be set to OLD)?
Setting policies by VERSION leaves policies newer than that version unset, not set to OLD. If it were to set them to OLD then no new policies would ever warn. There is intentionally no way to turn off warnings about policies newer than those known to the project code, except by using -Wno-dev locally. Otherwise developers would never see the warnings and know to update their code. > CMake Warning (dev) in src/CMakeLists.txt: > Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties. > Run "cmake --help-policy CMP0043" for policy details. Use the cmake_policy > command to set the policy and suppress this warning. > This warning is for project developers. Use -Wno-dev to suppress it. The non-config COMPILE_DEFINITIONS property has supported generator expressions since CMake 2.8.10. They can be used to get per-config values without using the per-config properties. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
