[CMake] Output other then to Makefile

Hendrik Sattler post at hendrik-sattler.de
Thu May 10 13:00:10 EDT 2007


Am Donnerstag 10 Mai 2007 16:34 schrieb Eric Noulard:
> 2007/5/10, Mielcarek, Donn <Donn.Mielcarek at wylelabs.com>:
> > We create binary releases for many different Linux
> >  distributions.  The guy who creates the releases
> >  compiles them all from the same source tree, compiling
> >  on different machines at the same time!  So all the
> >  Makefiles must be separate.
>
> yep good scheme :))
>
> Then I think separate build_tree would be really SIMPLE, nice AND
> effcicient. Separate build tree does not prevent you
> from building below the source tree.

For people that are you to run a configure script, I have the following in my 
source tree:
-------------- snip ---------------------
#!/bin/sh
generator="Unix Makefiles"
projectPath=$(dirname $0)
localConfigure=0

if test ${projectPath} = "."; then
  echo "Creating directory $(pwd)/build for out-of-source build..."
  mkdir -p build
  cd build
  projectPath=..
  localConfigure=1
fi

rm -f CMakeCache.txt
cmake -G "${generator}" ${projectPath}

if test ${localConfigure} -eq 1; then
  echo "Now run \"cd build\" to change to the build directory."
fi
-------------- snip ---------------------

HS


More information about the CMake mailing list