[CMake] Visual Studio Warning Level

Robert Dailey rcdailey at gmail.com
Fri Mar 27 15:43:05 EDT 2009


Hey guys,
I'm responding to this issue to check on the progress of this. I'm still
currently unable to easily set the warning level in Visual Studio to level 4
and I really need to be able to do this. This really is a serious issue for
me.

How are things going in this area? Would it be possible to have a quick
feature for this in CMake 2.6.4?

On Mon, Nov 24, 2008 at 8:42 AM, Bill Hoffman <bill.hoffman at kitware.com>wrote:

> Judicaël Bedouet wrote:
>
>
>> I love the idea to set warning flags in platform files but I don't
>> understand why new files must be created. Is not it possible to add
>> warning variables to existent platform files in Modules/Platform ?
>>
>>  That would be the end goal.  However, if someone wanted it sooner it
> could be done inside a project by creating platform files that could be
> merged into CVS CMake.   My point was that it would be much easier to merge
> a platform file based solution than a if,else type solution.
>
>  I wonder if it would be possible to add a CMAKE_WARNING_LEVEL variable
>> (like CMAKE_BUILD_TYPE) which could take values like Warning1,
>> Warning2, Warning3, Warning4 (or All, Full, No).
>> So we could define in platform files CMAKE_CXX_FLAGS_WARNING1_INIT,
>> CMAKE_CXX_FLAGS_WARNING2_INIT... variables (like
>> CMAKE_CXX_FLAGS_DEBUG_INIT, CMAKE_CXX_FLAGS_RELEASE_INIT).
>> The final default value for CMAKE_CXX_FLAGS would be
>> "${CMAKE_CXX_FLAGS_INIT} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}_INIT}
>> ${CMAKE_CXX_FLAGS_${CMAKE_WARNING_LEVEL}_INIT}".
>>
>> I think it would be a great idea that CMake provide default and
>> portable warning flags.
>>
> I am thinking we could use global properties for this, instead of
> variables.  Also, no need to use _INIT type stuff as it would not have to be
> stored in the cache, and users would never need/want to change them.
>
>  If you need any help, I would be very pleased to contribute.
>>
>>  Sounds good.
>
>
> -Bill
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090327/195f8480/attachment.htm>


More information about the CMake mailing list