[CMake] Help with cmake_policy

Brad King brad.king at kitware.com
Thu Feb 26 15:14:33 EST 2009


Alexander Neundorf wrote:
> On Wednesday 25 February 2009, eblotml at free.fr wrote:
>> The customer may not need to know about CMake internals, and get weird
>> warning messages. 
> 
> I'd also like to have them somewhat less scary looking...

Manu, are you actually cutting release snapshots for the customer and
delivering them outside your version control trunk?  In that case you
can make -Wno-dev the default by adding

   if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
     set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
   endif()

in your top CMakeLists.txt file in the snapshots.  Don't do this in your
development trees or you won't know about any new policies unless all your
developers use -Wdev.

>> It seems the only way to do this is to download and try 
>> the last release of CMake as soon as it gets available. As a developer, I
>> found some of the CMake policies a bit "cryptic" at first sight, and it may
>> take quite a while to understand the impact of such a policy change in
>> existing - which means time, while the customer can already download,
> 
> Yes, the policies are often for handling quite non-obvious corner cases.

...and they are needed because we didn't get the non-obvious corner cases
right on the first try :)

-Brad


More information about the CMake mailing list