title: Simple C++ program builds ok in CMake with Debug Config, but fails with release
body: <p>I have this simple C++ program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main(int argc, char *argv[])
  {
     std::cout &lt;&lt; "Hello Build Type!" &lt;&lt; std::endl;
     std::cin.get();
     return 0;
  }
  </code></pre>
  
  <p>I can build it with no issues using CMake command:
  <code>cmake --build .</code></p>
  
  <p>with CmakeLists.txt being this:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.5)
  set(CMAKE_CONFIGURATION_TYPES DEBUG)
  
  project (build_type CXX)
  add_executable(cmake_examples_build_type main.cpp)
  </code></pre>
  
  <p>However, when I change <code>CMAKE_CONFIGURATION_TYPES</code> to <code>RELEASE</code>, I get this error when I build with <code>cmake --build .</code></p>
  
  <blockquote>
    <p>Build started 10/24/2018 10:35:38 AM.<br>
    Project "C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ALL_BUILD.vcxproj" on node 1 (default targets).<br>
    Project "C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ALL_BUILD.vcxproj" (1) is building<br>
     "C:\Users\ialkeilani\OneDrive<br>
     - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).<br>
    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(61,5):  error MSB8013: This project doesn't contain the Configuration and Platform
    combination of Debug|Win32. [C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ZERO_CHECK.vcxproj]
    Done Building Project "C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ZERO_CHECK.vcxproj" (default targets) -- FAILED.</p>
    
    <p>Done Building Project "C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.</p>
    
    <p>Build FAILED.</p>
    
    <p>"C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ALL_BUILD.vcxproj" (default target) (1) ->
    "C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ZERO_CHECK.vcxproj" (default target) (2) ->
    (PlatformPrepareForBuild target) ->
      C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(61,5): error MSB8013: This project doesn't contain the Configuration and Platfor
    m combination of Debug|Win32. [C:\Users\ialkeilani\OneDrive - Ushrauto\temp\cmake-examples-master\01-basic\F-build-type\build\ZERO_CHECK.vcxproj]</p>
    
    <p>0 Warning(s)<br>
        1 Error(s)</p>
    
    <p>Time Elapsed 00:00:00.18</p>
  </blockquote>
  
  <p>Moreover, when I attempt to build using MSVC with this command:
  <code>msbuild build_type.sln /p:configuration=release</code></p>
  
  <p>build finishes ok with no issues.</p>
  
  <p>Can someone please enlighten me as to why is CMake is failing to build the release configuration while MSVC has no issues?</p>
  
  <p>Running MS Visual Studio 2013 and CMake 3.5.2</p>