[CMake] [cmake-developers] CMake IR
Bill Hoffman
bill.hoffman at kitware.com
Fri Jul 31 12:43:20 EDT 2015
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
More information about the CMake
mailing list