[cmake-developers] set(CACHE) and the local scope
Nagger
nagger at gmx.de
Thu Dec 10 18:29:05 EST 2015
Am 10.12.2015 um 21:26 schrieb Brad King:
> Alternatively the option() or set(CACHE) commands could also set a
> local variable to the same value as the cache entry.
I would vote for that.
Maybe optional arguments to set(CACHE) could be introduced to switch the
behavior.
Like set(... CACHED ... [UNSET_LOCAL] [OVERWRITE_LOCAL] [KEEP_LOCAL]).
What about locals in parent scopes, overwrite all of them?
Bug https://public.kitware.com/Bug/view.php?id=15448 is kind of related,
and also shows some weird effects of the current implementation.
Marc
More information about the cmake-developers
mailing list