mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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.
7 lines
253 B
CMake
7 lines
253 B
CMake
cmake_diagnostic(GET CMD_INSTALL_ABSOLUTE_DESTINATION action)
|
|
if(NOT "${action}" STREQUAL SEND_ERROR)
|
|
message(SEND_ERROR
|
|
"wrong action for diagnostic CMD_INSTALL_ABSOLUTE_DESTINATION"
|
|
" (expected 'SEND_ERROR', actual '${action}')")
|
|
endif()
|