[CMake] CMP0043 policy warning

Scott Aron Bloom scott.bloom at onshorecs.com
Thu Dec 11 04:50:17 EST 2014


That did it..

A bunch of my “sub” libraries get used across multiple projects, so they have their OWN “minimum”, now I put the policy setting in each cmake after the set_minum.

Thanks
Scott

From: Petr Kmoch [mailto:petr.kmoch at gmail.com]
Sent: Thursday, December 11, 2014 1:36 AM
To: Scott Aron Bloom
Cc: cmake at cmake.org
Subject: Re: [CMake] CMP0043 policy warning

Hi Scott.

Policy state is changed by explicit calls to cmake_policy() and implicitly by calls to cmake_minimum_required(). So you need to set the policy to the setting you want whenever each of these occurs (or modify them so that they set the policy the way you want it).
The documentation of cmake_policy() has details about this, including how the policy stack works. You should be able to find more info there.

Petr

On Thu, Dec 11, 2014 at 10:13 AM, Scott Aron Bloom <scott.bloom at onshorecs.com<mailto:scott.bloom at onshorecs.com>> wrote:
Im in the process of converting a CMake 2.X project to 3.X.

I cant for the life of me, find a deterministic way to properly SET the policy so I don’t get the

  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.

Should it be in each individual CMakeList.txt file?  Or just the top one?

to be honest, on my companies main project, I finally got it fixed, by putting it just about everywhere, but this is very frustrating.

Scott

--

Powered by www.kitware.com<http://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/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141211/82628963/attachment.html>


More information about the CMake mailing list