mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-04 14:50:23 +00:00
Diagnostic: Add warn or error on absolute install paths
Add `-Winstall-absolute-destination` diagnostic to warn or error when an install command has an absolute destination. This allow projects to enforce the best practice of not allowing absolute install DESTINATIONS.
This commit is contained in:
committed by
Brad King
parent
fd76089631
commit
39a56136a3
@@ -60,6 +60,11 @@ signatures that specify them. The common options are:
|
||||
``<dir>`` should be a relative path. An absolute path is allowed,
|
||||
but not recommended.
|
||||
|
||||
.. versionadded:: 4.4
|
||||
The :ref:`CMD_INSTALL_ABSOLUTE_DESTINATION <CMD_INSTALL_ABSOLUTE_DESTINATION>`
|
||||
diagnostic can be enabled to warn or error out when an absolute destination
|
||||
is provided.
|
||||
|
||||
When a relative path is given, it is interpreted relative to the value
|
||||
of the :variable:`CMAKE_INSTALL_PREFIX` variable.
|
||||
The prefix can be relocated at install time using the ``DESTDIR``
|
||||
|
||||
Reference in New Issue
Block a user