[Cmake] Specifying build trees
Karr, David
David . Karr at titan . com
Mon, 4 Aug 2003 16:17:25 -0400
> For example, you can do things like this:
>=20
> ProjectSource
>=20
> ProjectBuild-Microsoft
> ProjectBuild-Borland
> ProjectBuild-Cygwin
> ProjectBuild-Intel
>=20
> Where all there build trees share a single source tree.
Eventually I'd like to be able to do this.
I did manage to make an out-of-source build of CMake itself
using CMakeSetup. I'm not quite sure how this worked, however.
In any case I'd prefer something more like a command-line
option or an environment variable that you set up, because
then it's probably easy to give very specific written=20
instructions to other developers on my project so they can
do whatever I did.
Is there such a way to specify different build directories
from a given source directory, e.g. edit one line of a text
file somewhere or set an environment variable, and then
simply run CMake? An obvious hack is to insert a SET
command just after the PROJECT command in order to override
the definition of myproject_BINARY_DIR, but this seems to
partially defeat the purpose of PROJECT.
My actual situation is even a little more complicated than
all that, because people have been managing two related sets
of source as two separate workspaces and dumping all the=20
resulting binaries into a common directory structure (e.g.
all .exe's wind up in the same "bin" directory).
-- David