title: How to create a new configuration with CMake
body: <p>I'm trying to create a NewConfiguration for my project:</p>
  
  <pre><code>set (CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug;NewConfiguration" CACHE STRING "Configurations" FORCE)
  </code></pre>
  
  <p>But when I run CMake, I have multiple errors:</p>
  
  <pre><code>CMake Error: Error required internal CMake variable not set, cmake may be not be
   built correctly.
  Missing variable is:
  CMAKE_SHARED_LINKER_FLAGS_NEWCONFIGURATION
  CMake Error: Error required internal CMake variable not set, cmake may be not be
   built correctly.
  Missing variable is:
  CMAKE_CXX_FLAGS_NEWCONFIGURATION
  </code></pre>
  
  <p>I think I'm missing something...</p>
  
  <p>I also followed CMake FAQ:</p>
  
  <pre><code> if(CMAKE_CONFIGURATION_TYPES)
     set(CMAKE_CONFIGURATION_TYPES Release RelWithDebInfo Debug NewConfiguration)
     set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
       "Reset the configurations to what we need"
       FORCE)
   endif()
  </code></pre>
  
  <p>But same errors...</p>
  
  <p>EDIT:</p>
  
  <p>If I do:</p>
  
  <pre><code>    SET( CMAKE_CXX_FLAGS_PLAYERVIEWER "-Wall -Wabi" CACHE STRING "Flags used by the C++ compiler during maintainer builds." FORCE )
  SET( CMAKE_C_FLAGS_PLAYERVIEWER "-Wall -pedantic" CACHE STRING "Flags used by the C compiler during maintainer builds." FORCE )
  SET( CMAKE_EXE_LINKER_FLAGS_PLAYERVIEWER "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING "Flags used for linking binaries during maintainer builds." FORCE )
  SET( CMAKE_SHARED_LINKER_FLAGS_PLAYERVIEWER "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING "Flags used by the shared libraries linker during maintainer builds." FORCE )
  
  
  set (CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug;PlayerViewer" CACHE STRING "Configurations" FORCE)
  </code></pre>
  
  <p>It creates the new configuration, but I can not compile. I think flags are not correct. I am using <strong>Visual Studio 2008.</strong></p>
  
  <p>Thank you :)</p>