<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.<br></div>
<div><code> </div>
<div><br>project(testcmake)</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)</div>
<div>#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4669")<br>set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4669" CACHE STRING "Compilation flags" FORCE)#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4669")<br>
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4669" CACHE STRING "Compilation flags" FORCE)<br>add_executable(foo foo.cxx)<br></div>
<div>#doesn't work either</div>
<div>set_target_properties(foo PROPERTIES COMPILE_FLAGS "/wd4996")<br></div>
<div></code></div>
<div> <br>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.<br> <br>Thanks for your help,<br>
<br>Tom<br> </div></div>