https://github.com/Kitware/CMake
Raw File
Tip revision: 753373579e3dd8cf19f0fc18f4d9bec43a2d82e8 authored by Brad King on 27 June 2019, 11:35:14 UTC
CMake 3.15.0-rc3
Tip revision: 7533735
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.rst
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
-------------------------------------------

CMake sets this variable to a ``TRUE`` value when the
:variable:`CMAKE_INSTALL_PREFIX` has just been initialized to
its default value, typically on the first run of CMake within
a new build tree.  This can be used by project code to change
the default without overriding a user-provided value:

.. code-block:: cmake

  if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX "/my/default" CACHE PATH "..." FORCE)
  endif()
back to top