[CMake] Running configure/make from CMakeLists.txt

Eric Noulard eric.noulard at gmail.com
Thu Nov 20 07:24:27 EST 2008


2008/11/20 Sean Soria <sean.soria at gmail.com>:
> I'm trying to convert a project to cmake.  There are a lot of other
> open source libraries contained in the project which are compiled
> using configure/make.  I'd like to not have to convert their build
> methods to use cmake as well.  Is there a simple way to run
> configure/make on a directory from cmake?  I don't imagine I can put
> CMakeLists.txt into the directory because it will create a Makefile,
> which running ./configure would also do.

You may use
   execute_process
in order to run _ANY_ command during CMake time or
   add_custom_target
in order to run command at build time.

cmake --help-command execute_process
cmake --help-command add_custom_target

-- 
Erk


More information about the CMake mailing list