[CMake] Updating cache entries on variable modification

Theodore Papadopoulo Theodore.Papadopoulo at sophia.inria.fr
Wed Oct 14 10:59:17 EDT 2009


We have a project which can be built either with static or dynamic 
libraries. The toggle
is defined via an option named BUILD_SHARED which has some default value 
(let's say static).

Unfortunately, after the first "configure" in ccmake all the libraries 
are set to their values corresponding
to the default static choice  (typically .a files) and then changing the 
BUILD_SHARED option to shared
never recomputes the proper library names (still the .a files).

Is there a way to inavlidating or change the values of cached entries on 
the base of a change of an option.
Ideally, this should work with cmake 2.6 and above.

    Thank's a lot for any help...



More information about the CMake mailing list