[CMake] Passing parameters via command prompt

Steven Van Ingelgem steven at vaningelgem.be
Wed Nov 26 12:02:27 EST 2008


Hi Eric,


That's pretty bad as well, because if I change 1 small cpp file, I will be
rebuilding everything... Not very nice :).
I always run "cmake .", but is it possible to do for example:

------
mkdir static_release
cd static_release
cmake ..
------


Thanks,
Steven

2008/11/26 Eric Noulard <eric.noulard at gmail.com>

> 2008/11/26 Steven Van Ingelgem <steven at vaningelgem.be>:
> > What I would like to do is create some kind of batch generation for every
> > combination of debug/release, static/dynamic.
> >
> > So I would call:
> > echo building static release
> > cmake -D cfg=release -D link=static .
> > make all && make install
> >
> > echo building dynamic release
> > cmake -D cfg=release -D link=dynamic .
> > make all && make install
>
>
> if you want to batch all those builds then may be you should
> always start from a pristine empty build dir, thus you won't have to
> bother on pre-existing cache since there won't be any.
>
> echo building static release
> rm -rf release_static
> mkdir release_static
> cd release_static
> cmake -D cfg=release -D link=static .
> make all && make install
> cd ..
>
> echo building dynamic release
> rm -rf release_dynamic
> mkdir release_dynamic
> cd release_dynamic
> cmake -D cfg=release -D link=dynamic .
> make all && make install
> cd ..
>
>
> etc...
>
>
>
> --
> Erk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081126/b2c35f84/attachment.htm>


More information about the CMake mailing list