title: Compiler Flags from CMakeLists.txt don't appear in CMake-Gui or CMakeCache.txt
body: <p>I just started to learn CMake and thought I would have understood the basic process of first writing the <code>CMakeLists.txt</code>, then configuring to generate the <code>CMakeCache.txt</code>and at the end generating the <code>Makefiles</code>. </p>
  
  <p>However, when I try to apply it to the following CMakeLists.txt, I'm not getting the expected results and I'm not sure what is going wrong. Part of the CMakeLists.txt looks like this:</p>
  
  <pre><code># compiler flags
  if (CMAKE_COMPILER_IS_GNUCXX)
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive -Wall -Wformat-security")
      if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8)
          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
      endif()
  endif()
  </code></pre>
  
  <p>Since I'm using gcc/g++ 4.7.3, the compiler flags from the first if-statement should be set. But if I configure this with CMake-Gui, there are no compiler flags pre-defined whatsoever. The same happens when I out-comment the if-statements and just keep the <code>set(CMAKE_CXX_FLAGS ...)</code>. 
  When searching the <code>CMakeCache.txt</code> for any <code>-std=c++11</code> flags, I don't get any results, too.</p>
  
  <p>Why does this happen? What's the point of specifying compiler flags inside the <code>CMakeLists.txt</code> when they aren't used? Or am I getting something completely wrong and they are used, but then I don't know why and how I could check. </p>
  
  <p>When generating the actual (Eclipse CDT) project with <code>make</code> and importing it to Eclipse, I'm getting error messages that C++11 features can't be resolved, the <code>__cplusplus</code> macro contains the value <code>199711</code> so the <code>-std=c++11</code> flag is obviously not used.</p>