[CMake] CMAKE cache after CMakeList.txt is modified

Kishore, Jonnalagadda (IE10) Kishore.Jonnalagadda at honeywell.com
Tue Mar 20 11:01:04 EST 2007


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


More information about the CMake mailing list