unset.rst 621 B

12345678910111213141516171819202122232425
  1. unset
  2. -----
  3. Unset a variable, cache variable, or environment variable.
  4. ::
  5. unset(<variable> [CACHE | PARENT_SCOPE])
  6. Removes the specified variable causing it to become undefined. If
  7. ``CACHE`` is present then the variable is removed from the cache instead
  8. of the current scope.
  9. If ``PARENT_SCOPE`` is present then the variable is removed from the scope
  10. above the current scope. See the same option in the :command:`set` command
  11. for further details.
  12. ``<variable>`` can be an environment variable such as:
  13. ::
  14. unset(ENV{LD_LIBRARY_PATH})
  15. in which case the variable will be removed from the current
  16. environment.