title: How to change the build type to Release mode in cmake?
body: <p>I am trying to build a project in Release mode. By default it is built in debug mode. I am setting the variable <code>CMAKE_BUILD_TYPE</code> to "Release" in <code>CMakeLists.txt</code>. But it is still building the project in debug mode.
  When I pass "Release" as the build type in the CMake command, it still does not work.</p>
  
  <p>The CMake command that I am using is:</p>
  
  <pre><code>cmake -G"Visual Studio 10" -DCMAKE_BUILD_TYPE=Release
    -H"source_path" -B"Build path"
  </code></pre>
  
  <p>Please provide a solution if any.</p>