[cmake-developers] CPack API redesign

Eric Noulard eric.noulard at gmail.com
Thu Aug 12 14:42:18 EDT 2010


2010/8/12 Brad King <brad.king at kitware.com>:
> On 08/12/2010 08:20 AM, Eric Noulard wrote:
>> May be adding some extra warning flags wouldn't hurt?
>
> It can make user-performed builds from release tarballs look less clean
> if there is a warning their compiler adds with -Wall that we do not see.
> It may be worthwhile though to reduce dashboard cleanup iterations.
>
>> IF(NOT MINGW)
>
> Why not on MinGW?

Can't really remember why :-)
I'll check why.

>> IF(CMAKE_COMPILER_IS_GNUCC)
>
> Once we require CMake 2.6 we can use a flag table based on

I didn't even saw that there was still
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
since CMake can bootstrap itself, why requiring such ancient
version to build CMake itself?

> ${CMAKE_C_COMPILER_ID}:
>
> set(CMake_C_FLAGS_GNU "-Wall")
> set(CMake_C_FLAGS_Intel "-Wall")
> ...
>
> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMake_C_FLAGS_${CMAKE_C_COMPILER_ID}}")

That would be a good thing.
May it can be added now as an OPTION  (default to OFF) ?
Can even be defaulted to ON if appropriate CMake version is found
(checked with some IF sequence since VERSION_GREATER wasn't available in 2.4)

>>   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -ansi -Wall
>> -Wno-unused-function")
> [snip]
>>   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -ansi -Wall
>> -Woverloaded-virtual -Wno-unused-function")
>
> I think use of "-pedantic" is no longer recommended.  At least
> using some of the -Wxxx options would be okay IMO.

Yes that's true some "reasonable" set of "-Wxxx" options should be enough
to catch simple mistakes.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list