UNSET_NOTE.txt 514 B

123456789
  1. .. note::
  2. When evaluating :ref:`Variable References` of the form ``${VAR}``, CMake
  3. first searches for a normal variable with that name. If no such normal
  4. variable exists, CMake will then search for a cache entry with that name.
  5. Because of this, **unsetting a normal variable can expose a cache variable
  6. that was previously hidden**. To force a variable reference of the form
  7. ``${VAR}`` to return an empty string, use ``set(<variable> "")``, which
  8. clears the normal variable but leaves it defined.