https://github.com/Kitware/CMake
Raw File
Tip revision: b7d8c91822101ff9de07075e9b1f02e18c2725da authored by Brad King on 04 March 2020, 13:50:44 UTC
CMake 3.16.5
Tip revision: b7d8c91
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