Hello,
I am trying to set a variable that appears in CMakeCache. I made this
small example to show what I am trying to do.
CMakeLists.txt:
PROJECT(CMakeTest)
SET(VAR_FOR_TEST "firstValue" CACHE STRING "Just for testing")
set(VAR_FOR_TEST "secondValue")
MESSAGE (${VAR_FOR_TEST})
When I run cmake from the build-folder I get the message
"secondValue", but when I look in the CMakeCache.txt-file I see this:
//Just for testing
VAR_FOR_TEST:STRING=firstValue
Why is VAR_FOR_TEST set to firstValue, there is probably something I
missed in my CMakeLists.txt but I found no example for this kind of
problem on the Internet.
My CMake version is 2.6-patch 3, but I think the problem is my code not CMake.
Thanks for your help,
Stefan Köhnen
_______________________________________________
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