Thanks for the response. None of those are called in the CMakeLists.txt
file that the warning is issued for, they are both called in a file above
that one  in the build tree but said file also sets the CML0028 policy
afterwards. Is it possible that a call to cmake_minimum_required resets the
policies even for CMakeLists.txt that are not below it in the build system
tree?

Regards,
Pierre Andersson




From:   Nils Gladitz <nilsglad...@gmail.com>
To:     pierre.anders...@se.atlascopco.com, cmake@cmake.org
Date:   2014-07-11 11:31
Subject:        Re: [CMake] Setting Policy CMP0028



On 07/11/2014 11:00 AM, pierre.anders...@se.atlascopco.com wrote:
> I have a very large project that is built with CMake, and I'm trying to
> make it work a little nicer with CMake 3. Right now we, we see everal
> warnigns that policy CMP0028 is not set.
>
> Using
>
> cmake_policy(SET CMP0028 OLD)
>
> does not seem to take effect. It's set at the same, top level, place
> where other policies are set and these do take effect. Likewise, setting
> the policy to NEW does not make CMake produce the fatal error like the
> documentation says it should. What am I missing here?

With a minimal test case the policy seems to work for me in 3.0.

What might reset the policy after it was set is:
                 - A call to cmake_minimum_required()
                 - A call to cmake_policy(VERSION)

Nils
-- 

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/mailman/listinfo/cmake

Reply via email to