<div dir="ltr"><div>hi,</div><div><br></div><div>to disable useless warnings in visual studio 08, this works for me : </div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )<br></blockquote><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">On Mon, Oct 6, 2008 at 9:37 AM, Timenkov Yuri <span dir="ltr"><<a href="mailto:ytimenkov@gmail.com">ytimenkov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><br><br><div class="gmail_quote">2008/10/2 user790 user790 <span dir="ltr"><<a href="mailto:user790@gmail.com" target="_blank">user790@gmail.com</a>></span><div class="Ih2E3d">
<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div dir="ltr"><div>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.</div>
<div> </div>
<div>project(testcmake)<br></div>
<div># None of this works<br>#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4669")<br>set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4669" CACHE STRING "Compilation flags" FORCE)<br>#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4669")<br>
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4669" CACHE STRING "Compilation flags" FORCE)<br></div>
<div>add_executable(foo foo.cxx) <br></div></div></blockquote><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div dir="ltr"><div></div>
<div> </div>
<div>I have tried the same variants with COMPILE_FLAGS and CMAKE_CXX_FLAGS_DEBUG / RELEASE with the same unsuccess.</div></div></blockquote></div><div>1) What does your "unsuccess" mean?<br>2) You can edit flags from GUI, this should work.<br>
3) If you want to override settings, you can set these flags without caching. This usually works too.<br></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div class="Ih2E3d">
<div dir="ltr"><div></div>
<div> </div>
<div>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.</div>
<div> </div>
<div>Thanks for your help,</div>
<div> </div>
<div>Tom</div>
<div> </div></div>
<br></div>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>