When and under what conditions are the cache variable read?

In the top level CMakeLists.txt of my project I have the following
lines;

IF(NOT ARCH)
        MESSAGE(STATUS "Setting ARCH to x86")
    SET(ARCH "x86" CACHE STRING
                "Choose the architecture, options are:
${SUPPORTED_ARCHS}"
                FORCE)
ENDIF(NOT ARCH)

When I first run cmake I call it passing -DARCH=avr and everything work
fine. But if I modify the CMakeLists.txt and then run make cmake it
rerun but variables are not taken from CACHE. Now ARCH is blank and get
set to default "x86".

How can I control this?

Warm regards,
Kishore
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to