[CMake] Passing parameters via command prompt

Eric Noulard eric.noulard at gmail.com
Wed Nov 26 11:59:19 EST 2008


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


More information about the CMake mailing list