[IPOL discuss] 2 cmake questions

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Mon Nov 28 04:24:26 CET 2011


Hi,

I am trying to write a basic CMake configuration.

2 questions:
* I find `mkdir build; cd build; cmake ../; cd ../` quite
  annoying. Isn't there a cmake command-line option to tell where the
  build dir is? 
* The default Makefile produces by cmake has no option to cleanup
  everything (Makefile, CMakeCache.txt, CMakeFiles,
  cmake_install.cmake). How do I remove everything produced by cmake,
  without doing it manually?

PS: Two important informations were missing for me in the cmake
tutorial in the IPOL wiki:
* we use add_executable() to list *all* the source for an executable
* target_link_libraries() is also for libraries installed on the
  system
So far, I am disturbed by cmake hiding all the transformation path
from source to executable and the notions of object file and separate
compilation.

-- 
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/d92966c1/attachment.pgp>


More information about the discuss mailing list