[CMake] Persistency of cmake options

Andreas Pakulat apaku at gmx.de
Mon Nov 19 10:47:00 EST 2007


On 19.11.07 16:37:48, Salvatore Iovene wrote:
> If I call cmake with, say, -DFOO:STRING=Bar, how can I do so that the
> value of FOO will be remembered the next time cmake is issued, without
> having to give it explicitly? This is particularly usefule in case I
> just wanna do "make" again and have the makefiles be updated anyways.

You don't need to do anything extra. Calling cmake with -D... writes
that variable and its value into the CMakeCache.txt and thus the next
run of cmake issued via a simple make will use that variable. Same goes
for running "cmake ." in the builddir.

Andreas

-- 
You plan things that you do not even attempt because of your extreme caution.


More information about the CMake mailing list