[IPOL discuss] 2 cmake questions

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Mon Nov 28 13:59:34 CET 2011


> This should not work, see note below [1]. The intended use for cmake
> is to build in a different dir than the one containing the source
> code. So, lets say you have the source in ./src and you compile in
> ./build. You can safely do a 'rm -fr build/*' to get rid of
> everything.

OK for the concept of out-of-cource build, easy to cleanup with a
simple rm -rf. But for such out-ou-source build, it seems that I HAVE
to manually move to this build dir wth CD. The syntax provided by
Pierre dows not create the cmake files in the build dir.

I just want something like 

  mkdir /path/to/build/
  cmake -option /path/to/build/ /path/to/src/
         ^^^^^^^^^^^^^^^^^^^^^^
                               `-> would create CMakeFiles, CMakeCache,
                                   etc. in /path/to/build/
  make -C /path/to/build/
  rm -rf /path/to/build

So far, it seems that cmake always create the CMakeStuff in the
current directory.

I think my two wishes are incompatible in the cmake world:
* a want a command (a make, cmake or a simple rm) to cleanup everything
* I want to manage all the build process without moving

-- 
Nicolas LIMARE - CMLA - ENS Cachan    http://www.cmla.ens-cachan.fr/~limare/
IPOL - image processing on line                          http://www.ipol.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20111128/ba60c395/attachment.pgp>


More information about the discuss mailing list