Re: [cmake-developers] CMake API for warnings

2016-04-29 Thread Ruslan Baratov via cmake-developers
This one looks like a plan. However I will not be able to work on the feature till ~15 May. So if anybody have a free time to start this work - feel free to do it and share patches :) Thanks, Ruslo On 22-Apr-16 20:36, Brad King wrote: On 04/20/2016 09:50 AM, Ruslan Baratov wrote: 1)

Re: [cmake-developers] CMake API for warnings

2016-04-27 Thread Ruslan Baratov via cmake-developers
On 26-Apr-16 01:58, Brad King wrote: On 04/23/2016 12:11 AM, Ruslan Baratov wrote: It means ignoring directory properties. So by default we will inherit settings. [snip] To disable inheriting we need to add extra argument (?) to *_compile_warnings: add_compile_warnings(DISABLE warn-A)

Re: [cmake-developers] CMake API for warnings

2016-04-25 Thread Brad King
On 04/23/2016 12:11 AM, Ruslan Baratov wrote: > It means ignoring directory properties. So by default we will inherit > settings. [snip] > To disable inheriting we need to add extra argument (?) to *_compile_warnings: > > add_compile_warnings(DISABLE warn-A) >

Re: [cmake-developers] CMake API for warnings

2016-04-22 Thread Ruslan Baratov via cmake-developers
On 22-Apr-16 20:36, Brad King wrote: On 04/20/2016 09:50 AM, Ruslan Baratov wrote: 1) add_compile_warnings * similar to add_definitions, add_compile_options * modify COMPILE_WARNINGS directory property (append) 2) target_compile_warnings * similar to target_compile_options,

Re: [cmake-developers] CMake API for warnings

2016-04-22 Thread Brad King
On 04/20/2016 09:50 AM, Ruslan Baratov wrote: > 1) add_compile_warnings >* similar to add_definitions, add_compile_options >* modify COMPILE_WARNINGS directory property (append) > 2) target_compile_warnings >* similar to target_compile_options, target_compile_definitions >* modify

Re: [cmake-developers] CMake API for warnings

2016-04-20 Thread Ruslan Baratov via cmake-developers
So here is a summary of this feature so far: Introducing new 3 functions for controlling compiler warnings: 1) add_compile_warnings * similar to add_definitions, add_compile_options * modify COMPILE_WARNINGS directory property (append) 2) target_compile_warnings * similar to

Re: [cmake-developers] CMake API for warnings

2016-04-18 Thread Brad King
On 04/13/2016 01:20 AM, Ruslan Baratov wrote: >>> new variable like CMAKE_CHECK_WARNINGS_CONFLICTS=OFF may control this. >> I'd prefer to avoid extra knobs if possible. > Okay, what about CMake warning for developer? (cmake -Wdev/cmake -Wno-dev) Sure. >>> You mean this: >>> >>>

Re: [cmake-developers] CMake API for warnings

2016-04-12 Thread Ruslan Baratov via cmake-developers
On 13-Apr-16 01:00, Brad King wrote: Hi Ruslo, Sorry for taking so long to respond here. I've been hoping to find time to think through the design deeply but I don't know when that may happen. Here is some more feedback. I invite others to jump in here. Without more interest I'm hesitant to

Re: [cmake-developers] CMake API for warnings

2016-04-12 Thread Brad King
Hi Ruslo, Sorry for taking so long to respond here. I've been hoping to find time to think through the design deeply but I don't know when that may happen. Here is some more feedback. I invite others to jump in here. Without more interest I'm hesitant to proceed. On 04/05/2016 02:03 PM,

Re: [cmake-developers] CMake API for warnings

2016-04-10 Thread Ruslan Baratov via cmake-developers
Sounds good? On 06-Apr-16 01:03, Ruslan Baratov via cmake-developers wrote: On 05-Apr-16 21:03, Brad King wrote: On 03/31/2016 12:47 PM, Ruslan Baratov wrote: What about 3 properties containing list of 's (groups unexpanded): * COMPILE_WARNINGS_DISABLE # e.g. "shift-sign-overflow;unused" *

Re: [cmake-developers] CMake API for warnings

2016-04-05 Thread Ruslan Baratov via cmake-developers
On 05-Apr-16 21:03, Brad King wrote: On 03/31/2016 12:47 PM, Ruslan Baratov wrote: What about 3 properties containing list of 's (groups unexpanded): * COMPILE_WARNINGS_DISABLE # e.g. "shift-sign-overflow;unused" * COMPILE_WARNINGS_ENABLE # e.g. "ALL" * COMPILE_WARNINGS_TREAT_AS_ERROR # e.g.

Re: [cmake-developers] CMake API for warnings

2016-04-05 Thread Brad King
On 03/31/2016 12:47 PM, Ruslan Baratov wrote: > What about 3 properties containing list of 's (groups > unexpanded): > > * COMPILE_WARNINGS_DISABLE # e.g. "shift-sign-overflow;unused" > * COMPILE_WARNINGS_ENABLE # e.g. "ALL" > * COMPILE_WARNINGS_TREAT_AS_ERROR # e.g. group + specific:

Re: [cmake-developers] CMake API for warnings

2016-03-31 Thread Ruslan Baratov via cmake-developers
On 31-Mar-16 20:37, Brad King wrote: On 03/29/2016 11:24 AM, Ruslan Baratov wrote: OTOH many such switches are so specific that they should not be abstracted and can instead be added to COMPILE_OPTIONS with a $ genex guard. What about generating nothing for such cases? Yes, that makes sense.

Re: [cmake-developers] CMake API for warnings

2016-03-30 Thread Simon Richter
Hi, On 27.03.2016 07:10, Geoffrey Viola wrote: > CMake should support an API to manage compiler warnings to simplify a > common problem. Using more compilers with high levels of warnings means > cheap static analysis and better conformance to standard C++. With my Linux distro hat on: please

Re: [cmake-developers] CMake API for warnings

2016-03-29 Thread Ruslan Baratov via cmake-developers
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

Re: [cmake-developers] CMake API for warnings

2016-03-29 Thread Ruslan Baratov via cmake-developers
On 29-Mar-16 21:24, Brad King wrote: On 03/29/2016 09:09 AM, Ruslan Baratov wrote: 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

Re: [cmake-developers] CMake API for warnings

2016-03-29 Thread Brad King
On 03/29/2016 09:09 AM, Ruslan Baratov wrote: > 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

Re: [cmake-developers] CMake API for warnings

2016-03-29 Thread Ruslan Baratov via cmake-developers
ots.com> Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] CMake API for warnings I like an effort but not an implementation: * It would be nice to not to set flags globally since we have more fine control options like target_compile_options (i.e. different target may

Re: [cmake-developers] CMake API for warnings

2016-03-29 Thread Ruslan Baratov via cmake-developers
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

Re: [cmake-developers] CMake API for warnings

2016-03-28 Thread Brad King
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

Re: [cmake-developers] CMake API for warnings

2016-03-27 Thread Geoffrey Viola
s does. From: Ruslan Baratov [mailto:ruslan_bara...@yahoo.com] Sent: Sunday, March 27, 2016 4:17 PM To: Geoffrey Viola <geoffrey.vi...@asirobots.com> Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] CMake API for warnings I like an effort but not an implementation: * It w

Re: [cmake-developers] CMake API for warnings

2016-03-27 Thread Ruslan Baratov via cmake-developers
I like an effort but not an implementation: * It would be nice to not to set flags globally since we have more fine control options like target_compile_options (i.e. different target may have different warning settings) * this will not work for Xcode since warnings should be set by

[cmake-developers] CMake API for warnings

2016-03-26 Thread Geoffrey Viola
CMake should support an API to manage compiler warnings to simplify a common problem. Using more compilers with high levels of warnings means cheap static analysis and better conformance to standard C++. Compiler warnings are an easy way to increase program reliability. A use case would be to