[CMake] different obj dirs for debug and release

Alexander Neundorf a.neundorf-work at gmx.net
Wed May 16 13:06:37 EDT 2007


On Wednesday 16 May 2007 12:18, Davide Bacchet wrote:
> Hi,
>
> it there a way to set different object directories for debug/release
> build (for gnu make and nmake targets)?
> Now, the object files are placed in the LIBNAME.dir directories, but if
> I first build a debug version and then a release using the same
> CMakeLists files, the obj files will be overwritten.
>
> The best option would be to build BOTH the debug and release versions
> with a single command, and store all the intermediate files in separate
> dirs.
>
> Any suggestion is welcome! :)

Build out of source and use one buildtree for release and another buildtree 
for the debug build.

Bye
Alex


More information about the CMake mailing list