[Cmake] CMake SET + CMakeCache.txt
Neil Killeen
Neil.Killeen at atnf.csiro.au
Tue Apr 8 21:14:32 EDT 2003
On Tue, 8 Apr 2003, Brad King wrote:
> > If I do
> >
> > SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
> >
> > then the ccmake user does not see the new string -Wno-deprecated. OK,
> > but what if they then decide to put some text on the line themselves
> > with the ccmake GUI interface.
> >
> > Is this new text that they type in appended to what I had set above or
> > does it replace it ?
>
> The setting in the GUI only changes the value in the cache. When the next
> cmake configure step is done, the value is loaded to initalize the
> corresponding cmake variable. Then the SET command is invoked and appends
> the flags again.
>
> Each time you hit "c" in the ccmake GUI, a whole new pass through the
> cmake listfiles is executed. All variable values are re-initialized to
> the values from the cache before the pass begins.
>
> -Brad
>
oh i see. i did not appreciate the order in which things were done (makes
more sense now). i have just looked at the cmake docs. again and as far as i can see (did
not look exhaustively) it does not explictly say the order in which things are
done. i think it would be useful to include this in the 'What is the
CMAke cache' section.
cheers
Neil
More information about the CMake
mailing list