diff options
author | Brad King <brad.king@kitware.com> | 2009-09-10 20:59:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-10 20:59:45 (GMT) |
commit | ee2b446c953f278eefff44f964f6e39cdc0fff78 (patch) | |
tree | 0f4213c3893cd8f6e30c6c878230b4c8680e33c5 /Source/cmOptionCommand.cxx | |
parent | afbe0883094afddb7cbaedcb8d89031ef503ed3b (diff) | |
download | CMake-ee2b446c953f278eefff44f964f6e39cdc0fff78.zip CMake-ee2b446c953f278eefff44f964f6e39cdc0fff78.tar.gz CMake-ee2b446c953f278eefff44f964f6e39cdc0fff78.tar.bz2 |
Create CMake Policy CMP0015 to fix set(CACHE)
The set(CACHE) and option() commands should always expose the cache
value. Previously we failed to expose the value when it was already set
if a local variable definition hid it. When set to NEW, this policy
tells the commands to always remove the local variable definition to
expose the cache value. See issue #9008.
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r-- | Source/cmOptionCommand.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 8f2bd66..5bd66a5 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -58,6 +58,7 @@ bool cmOptionCommand if ( it.GetType() != cmCacheManager::UNINITIALIZED ) { it.SetProperty("HELPSTRING", args[1].c_str()); + this->Makefile->UseCacheDefinition(it); return true; } if ( it.GetValue() ) |