On 10/29/2015 10:33 AM, Sylvain Joubert wrote:
> I recently upgraded to CMake >= 3.3 and I get a CMP0058 warning on some
> of the generated files. What I don't understand is that:
> - These files are not generated at build time but at configure time,
>   why can't they just be seen as regular source files?

They can, but CMake does not know that for sure so it warns about the
policy's behavior change just in case.  In your case you know everything
is okay so you can go ahead and tell CMake to use its new preferred
behavior because it won't break anything.

All you have to do is add the code:

 if(POLICY CMP0058)
   cmake_policy(SET CMP0058 NEW)
 endif()

You can drop that in the future when you use

 cmake_minimum_required(VERSION 3.3)

which will set the policy to NEW automatically.

See further details in the policy docs:

 https://cmake.org/cmake/help/v3.3/policy/CMP0058.html
 https://cmake.org/cmake/help/v3.3/manual/cmake-policies.7.html
 https://cmake.org/cmake/help/v3.3/command/cmake_policy.html

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

Reply via email to