[CMake] How to specify default build dir in CMakeLists.txt?

Brad King brad.king at kitware.com
Tue Sep 19 10:08:37 EDT 2006


Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA wrote:
> 	The goal is to have an out-of-source build by default.
> The target is a programmer who compiles my package just
> to get the libraries needed for another project. He would
> have one less option to worry about, especially, if
> he wasn't familiar with CMake. That programmer
> would be accessing the source code from Subversion repository. The
> out-of-source compilation would prevent problems related to
> adding/deleting/adding back/ a directory. If the programmer
> wanted to work on my library, he would changed the default to his 
> preferred structure (./build/debug/, ./build/optimized, etc.).
> He could also shoot himself in the foot and change it to in-source 
> compilation.

I think what you essentially want is an alternative place to put the
build files for an in-source build to keep them out of the actual source
directories.  This is an interesting idea.  Please submit a feature
request so that we won't lose it.

Thanks,
-Brad


More information about the CMake mailing list