[Cmake] camke 1.8.0 + out of source build + cache

Brad King brad . king at kitware . com
Wed, 20 Aug 2003 11:58:34 -0400 (EDT)


> with cmake 1.8.0 there seems to be a problem with out of source builds
> (source dir != build dir). If there is already a cache file in source
> directory, then nothing is generated in build directory.

In that case it configures your in-source build because cmake 1.8 supports
passing a build tree as an argument (I just noticed that cmake --help
doesn't say this.  I'll fix that).  When cmake sees the CMakeCache.txt
file in the source tree, it assumes it is a build tree.

It is not safe to have any out-of-source builds with a source tree that
has an in-source build.  There are several things that can go wrong such
as configured header files that get chosen from the wrong build
configuration since they are present in the source tree.

-Brad