CMP0126.rst 762 B

1234567891011121314151617181920
  1. CMP0126
  2. -------
  3. .. versionadded:: 3.21
  4. The :command:`set(CACHE)` does not remove a normal variable of the same name.
  5. Starting with CMake 3.21, the :command:`set(CACHE)` does not remove, in the
  6. current scope, any normal variable with the same name.
  7. The ``OLD`` behavior for this policy is to have the :command:`set(CACHE)`
  8. command removing the normal variable of the same name, if any. The ``NEW``
  9. behavior for this policy is to keep the normal variable of the same name.
  10. This policy was introduced in CMake version 3.21. Use the
  11. :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  12. Unlike many policies, CMake version |release| does *not* warn when the policy
  13. is not set and simply uses ``OLD`` behavior.
  14. .. include:: DEPRECATED.txt