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.
This commit is contained in:
Brad King
2009-09-10 16:59:45 -04:00
parent afbe088309
commit ee2b446c95
7 changed files with 94 additions and 2 deletions
+4 -2
View File
@@ -69,8 +69,10 @@ public:
" set(<variable> <value>\n"
" [[CACHE <type> <docstring> [FORCE]] | PARENT_SCOPE])\n"
"Within CMake sets <variable> to the value <value>. <value> is expanded"
" before <variable> is set to it. If CACHE is present, then the "
"<variable> is put in the cache. <type> and <docstring> are then "
" before <variable> is set to it. If CACHE is present and <variable> "
"is not yet in the cache, then <variable> is put in the cache. If it is "
"already in the cache, <variable> is assigned the value stored in the "
"cache. If CACHE is present, also <type> and <docstring> are "
"required. <type> is used by the CMake GUI to choose a widget with "
"which the user sets a value. The value for <type> may be one of\n"
" FILEPATH = File chooser dialog.\n"