[CMake] [VS gen] Multiple configurations code

Olaf van der Spek olafvdspek at gmail.com
Mon Jul 26 16:50:03 EDT 2010


On Mon, Jul 26, 2010 at 10:42 PM, Andreas Pakulat <apaku at gmx.de> wrote:
>> I'm not familiar with the term build tree.
>
> That seems to be your problem here. The so-called "source tree" is the
> project folder on your disk containing the actual source files and the
> CMakeLists.txt files. The build-tree on the other hand is the folder in
> which you run cmake to generate the build files (Makefiles or whatever).

Then it's a given that multiple build trees are needed.

> The usual way with Makefiles is to:
>
> <setup tools for x64/release>
> mkdir x64_release
> cd x64_release
> cmake ..
> nmake
> <setup tools for x64/debug>
> mkdir x64_debug
> cd x64_debug
> cmake ..
> nmake
> <setup tools for x86/debug>
> mkdir x86_debug
> cd x86_debug
> cmake ..
> nmake
>
> So the various build-tree's for the configurations are separate subdirs
> inside your source-tree (you can also put them completely outside of
> your source-tree). So there's only 1 set of source/cmake files, but
> multiple sets of makefiles/buildfiles.

Makes sense, but that's certainly not something one wants to do by
hand. In the VS case, it seems already possible to generate a project
containing four different configurations. I'm asking for more
configurations to be added.

Olaf


More information about the CMake mailing list