diff options
author | Brad King <brad.king@kitware.com> | 2009-10-08 18:56:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-08 18:56:15 (GMT) |
commit | 9a77f65da7d3275760a60d0a6180a9c240ba30e5 (patch) | |
tree | 7326f55451af5e372483a512caaa44906a67570a /Source/cmPolicies.cxx | |
parent | 24bf97440fc8730860620c65d9dfd487ca68c69d (diff) | |
download | CMake-9a77f65da7d3275760a60d0a6180a9c240ba30e5.zip CMake-9a77f65da7d3275760a60d0a6180a9c240ba30e5.tar.gz CMake-9a77f65da7d3275760a60d0a6180a9c240ba30e5.tar.bz2 |
Remove CMake Policy CMP0015 until it is revised
We revert commit "Create CMake Policy CMP0015 to fix set(CACHE)" because
the NEW behavior of the policy breaks a valid use case:
# CMakeLists.txt
option(BUILD_SHARED_LIBS "..." ON)
add_library(mylib ...)
set(BUILD_SHARED_LIBS OFF) # we want only mylib to be shared
add_subdirectory(ThirdParty)
# ThirdParty/CMakeLists.txt
option(BUILD_SHARED_LIBS "..." ON)
# uh, oh, with NEW behavior this dir uses shared libs!!!
We'll re-introduce the policy later with a different change in behavior
to resolve the motivating case, which was more subtle but less common.
See issue #9008.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index a7292cf..0d35b65 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -401,37 +401,6 @@ cmPolicies::cmPolicies() "The OLD behavior for this policy is to silently ignore the problem. " "The NEW behavior for this policy is to report an error.", 2,8,0, cmPolicies::WARN); - - this->DefinePolicy( - CMP0015, "CMP0015", - "The set() CACHE mode and option() command make the cache value visible.", - "In CMake 2.6 and below the CACHE mode of the set() command and the " - "option() command did not expose the value from the named cache entry " - "if it was already set both in the cache and as a local variable. " - "This led to subtle differences between first and later configurations " - "because a conflicting local variable would be overridden only when the " - "cache value was first created. " - "For example, the code\n" - " set(x 1)\n" - " set(before ${x})\n" - " set(x 2 CACHE STRING \"X\")\n" - " set(after ${x})\n" - " message(STATUS \"${before},${after}\")\n" - "would print \"1,2\" on the first run and \"1,1\" on future runs." - "\n" - "CMake 2.8.0 and above prefer to expose the cache value in all cases by " - "removing the local variable definition, but this changes behavior in " - "subtle cases when the local variable has a different value than that " - "exposed from the cache. " - "The example above will always print \"1,2\"." - "\n" - "This policy determines whether the commands should always expose the " - "cache value. " - "The OLD behavior for this policy is to leave conflicting local " - "variable values untouched and hide the true cache value. " - "The NEW behavior for this policy is to always expose the cache value.", - 2,8,0, cmPolicies::WARN); - } cmPolicies::~cmPolicies() |