[CMake] Auto re-configuring until cache stops changing

David Cole david.cole at kitware.com
Wed Sep 8 07:24:45 EDT 2010


On Wed, Sep 8, 2010 at 3:43 AM, Diablo 666 <thediablo666 at hotmail.de> wrote:

>  Hi,
>
> > What I meant was that the curses and Qt UI's should behave more like
> 'cmake'.
>
> What does cmake actually do? The following code runs into an infinite loop
> on
> ccmake (like intended), but cmake seems to finish after the first pass (it
> just prints
> out "on" once), though there is a newly introduced cache variable on every
> run.
>
> SET (FOOBAR OFF CACHE BOOL "bla")
> IF (NOT FOOBAR)
>     SET (FOOBAR ON CACHE BOOL "bla" FORCE)
>     SET (BLA ON CACHE BOOL "foobar")
>     UNSET (FOO CACHE)
>     MESSAGE (STATUS "on")
> ELSE()
>     SET (FOOBAR OFF CACHE BOOL "bla" FORCE)
>     UNSET (BLA CACHE)
>     SET (FOO ON CACHE BOOL "barfoo")
>     MESSAGE (STATUS "off")
> ENDIF(NOT FOOBAR)
>
>
> Andreas
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


"cmake" configures exactly once and generates at the end of that configure,
regardless of any "now new" options or settings.

If you run it again, it will do the same again, and in your case, you should
see the "off" message on the 2nd run.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100908/347ed0ed/attachment.htm>


More information about the CMake mailing list