[CMake] Out-of-source build without user intervention

Brad King brad.king at kitware.com
Fri Jul 22 13:14:17 EDT 2005


Hendrik Belitz wrote:
> I have a little question regarding out-of-source builds with CMake. I want to 
> make out-of-source builds to a designated directory by default, but I don't 
> know how to do it. Generating a build directory by hand and calling CMake 
> from there is too tedious for what I want to do. Any suggestions on this?

cmake -H/path/to/source -B/path/to/build

will do an out of source build in a single command.  This way you do not 
need to manually create the build tree and enter it first.

-Brad


More information about the CMake mailing list