On 11/06/2012 08:55 AM, Stephen Kelly wrote: > If CMake enabled more warnings by default, developers would notice them > locally too before even submitting to the dashboard.
s/would/might/ but it could still be useful. I'd prefer extra warnings only in a condition like if(NOT CMake_VERSION_IS_RELEASE) ... endif() > I would prefer to also add -Wundef, but kwsys is not clean with that flag > and creates many warnings, so it would have to be fixed there first. I'm still catching up getting not-so-portable KWSys changes contributed for another project into CMake. After that is done then we can look at it. > I'm fairly sure it would work with GCC 4.2 or later (and I guess clang as > well), which would probably cover many cmake developers. The GCC version > check only becomes a lot easier with a recent version of CMake Just use if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2) When built with a CMake that does not define the version variable one simply won't get the extra warnings. Not a big deal. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers