On 7/31/2015 12:33 PM, Ruslan Baratov wrote:
> rm -rf _builds
> cmake -H. -B_builds
> cmake -H. -B_builds -DA=ON
> grep '\<B\>' _builds/CMakeCache.txt
B:STRING=There is no A
I'm not saying cache is a bad idea, I'm just saying that when users hit
such kind of situations that's one of the reason why they said CMake is
not a good script language. Just like CMake before CMP0054: user see
`if("a" STREQUAL "b")` and think "okay, 'a' is not equal to 'b' so this
condition is always false"... nope!
OK, it is a bit confusing. One solution would be to treat the cache
variables with some sort of separate look up. Basically put all cache
stuff into its own namespace.
Something like:
$CACHE{A}
Then, it would never be confused with the the variable A. However,
getting rid of the cache would not be something that could be done.
-Bill
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake