mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-23 07:28:51 -06:00
ENH: Added INSTALL(CODE) mode to allow inline specification of install script code. This reduces the need for configuring an install script that needs some variable settings because the install code can set thing up first.
This commit is contained in:
@@ -4,6 +4,11 @@ IF(INSTALL_SCRIPT_1_DID_RUN)
|
||||
ELSE(INSTALL_SCRIPT_1_DID_RUN)
|
||||
MESSAGE(FATAL_ERROR "Install script 1 did not run before install script 2.")
|
||||
ENDIF(INSTALL_SCRIPT_1_DID_RUN)
|
||||
IF(INSTALL_CODE_DID_RUN)
|
||||
MESSAGE("Install code ordering works.")
|
||||
ELSE(INSTALL_CODE_DID_RUN)
|
||||
MESSAGE(FATAL_ERROR "Install script 2 did not run after install code.")
|
||||
ENDIF(INSTALL_CODE_DID_RUN)
|
||||
FILE(WRITE "${CMAKE_INSTALL_PREFIX}/MyTest/InstallScriptOut.cmake"
|
||||
"SET(CMAKE_INSTALL_SCRIPT_DID_RUN 1)\n"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user