[cmake-developers] CMake API for warnings

Ruslan Baratov ruslan_baratov at yahoo.com
Tue Mar 29 09:09:46 EDT 2016


On 28-Mar-16 21:05, Brad King wrote:
> On 03/28/2016 01:49 AM, Geoffrey Viola wrote:
>> Thanks for the feedback. I’ll have to look more in-depth at Xcode specific issues.
>>> Take a look at this approach:
>>> * https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression
>> I took a look at your repository. It’s very sophisticated.
> I'd prefer to see an approach that abstracts the warning levels
> in a similar way to COMPILE_FEATURES, COMPILE_DEFINITIONS,
> INCLUDE_DIRECTORIES, etc.  Project code would set directory or
> target properties to specify warning levels and the generators
> would map them to the proper flags or project file settings
> automatically.
As a general note obviously I've used another approach because I decide 
to create CMake module which can be used with regular CMake versions :) 
Of course implementing this in CMake "from the box" is best.

Are we talking about levels only or about control of exact kind of 
warnings too (like `-Wswitch`/`-wswitch`/`-Werror=switch`)?

Ruslo

>
> Something like this has long been missing for compiler warnings
> and optimization levels.
>
> -Brad
>



More information about the cmake-developers mailing list