title: Overwriting flag set in CMAKE_CXX_FLAGS by flag set in CMAKE_CXX_FLAGS_DEBUG
body: <p>On my system, CMake populates <code>CMAKE_CXX_FLAGS</code> with <code>O2</code> optimization flags and
  and I add <code>O0</code> flags for the debug configurations, such that I find this in my CMakeCache.txt:</p>
  <pre><code>//Flags used by the CXX compiler during all build types.
  CMAKE_CXX_FLAGS:STRING=-O2
  
  //Flags used by the CXX compiler during DEBUG builds.
  CMAKE_CXX_FLAGS_DEBUG:STRING=-O0
  </code></pre>
  <p>According to the documentation of CMake, the configuration dependent flags are appended. The issue with this seems to be, that the <code>02</code> flag appears to take precedence over the <code>O0</code> flag. Is there a way to configure CMake, possibly from cli call to it, such that it uses <code>O0</code> instead?</p>