[CMake] Disable warnings in Visual Studio Express 2008

Mehdi Rabah mehdi.rabah at gmail.com
Tue Oct 7 11:01:09 EDT 2008


hi,

to disable useless warnings in visual studio 08, this works for me :

add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
>




On Mon, Oct 6, 2008 at 9:37 AM, Timenkov Yuri <ytimenkov at gmail.com> wrote:

>
>
> 2008/10/2 user790 user790 <user790 at gmail.com>
>
>> Disabling specific warnings is a simple task so I thought I could do it
>> myself but I must admit defeat. A simple CMakeLists.txt like this won't
>> work.
>>
>> project(testcmake)
>> # None of this works
>> #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4669")
>> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4669" CACHE STRING "Compilation
>> flags" FORCE)
>> #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4669")
>> #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4669" CACHE STRING
>> "Compilation flags" FORCE)
>> add_executable(foo foo.cxx)
>>
>
>> I have tried the same variants with COMPILE_FLAGS and
>> CMAKE_CXX_FLAGS_DEBUG / RELEASE with the same unsuccess.
>>
> 1) What does your  "unsuccess" mean?
> 2) You can edit flags from GUI, this should work.
> 3) If you want to override settings, you can set these flags without
> caching. This usually works too.
>
>>
>> I only have VS Express 2008 so I can't check whether I am doing something
>> wrong or if there is some issue with this particular IDE -- not even sure if
>> it is explicitely not supported.
>>
>> Thanks for your help,
>>
>> Tom
>>
>>
>> _______________________________________________
>> CMake mailing list
>> CMake at cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
> _______________________________________________
> 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/20081007/d62663ee/attachment.htm>


More information about the CMake mailing list