title: CMake: How to treat every resource compiler warning as error and to suppress specific warnings?
body: <p>To suppress specific warning in specific source file when using <a href="https://cmake.org" rel="nofollow noreferrer">CMake</a> to generate <strong>MSVC</strong> projects I'm using something like:</p>
  
  <pre><code>set_source_files_properties(
      "ToursInfoMng.cpp"
    PROPERTIES
      COMPILE_FLAGS "/wd4503")
  </code></pre>
  
  <p>This doesn't work for resource compiler warnings. For example for warning:</p>
  
  <pre><code>warning RC4206: title string too long; truncated at 256
  </code></pre>
  
  <p>I tried to use:</p>
  
  <pre><code>set_source_files_properties(
      "ResEs.rc"
    PROPERTIES
      COMPILE_FLAGS "/wd4206")
  </code></pre>
  
  <p>but this doesn't suppress the warning.</p>
  
  <ul>
  <li>How to suppress resource compiler warning properly?</li>
  <li>How to treat resource compiler warnings which are not suppressed as errors?</li>
  </ul>
  
  <p>I'm using <code>\WX</code> for both compiler and linker warnings setting it to <code>CMAKE_CXX_FLAGS</code> and <code>CMAKE_STATIC|SHARED|EXE_LINKER_FLAGS</code> respectively, but I don't know how to do it for resource compiler warnings.</p>