Create build tree for different build types with CMake
<p>I know how to have CMake output libs and bins depending on the build type (release, debug, etc), but, in order to reduce (re)compile times, I would like to have CMake build them in different subfolders.</p>

<p>Say I have this kind of tree </p>

<pre><code>|- CMakeLists.txt
|- build/
|- src/
</code></pre>

<p>If I have debug, release, and relwithdebinfo builds, I want CMake to automatically create me a tree like </p>

<pre><code>|- CMakeLists.txt
|- build/
|--- Debug/
|--- Release/
|--- RelWithDebInfo/
|- src/
</code></pre>

<p>and so on. 
Is this possible, if yes how can I achieve my goal ? </p>

<p>I do not want answers like "you should run CMake from different folders", since for visual studio this would lead to multiple solutions, etc.
I want to be able to run CMake from only one folder, and have it handle subfolders by itself.</p>