STYLE: Nightly Date Stamp
[cmake.git] / Tests / SimpleInstallS2 / InstallScript4.cmake
blob0ffea4bc898b09afeb7b866a461e3bf063409363
1 MESSAGE("This is install script 4.")
2 IF(INSTALL_SCRIPT_3_DID_RUN)
3   MESSAGE("Install script ordering works.")
4 ELSE(INSTALL_SCRIPT_3_DID_RUN)
5   MESSAGE(FATAL_ERROR "Install script 3 did not run before install script 4.")
6 ENDIF(INSTALL_SCRIPT_3_DID_RUN)
7 IF(INSTALL_CODE_WITH_COMPONENT_DID_RUN)
8   MESSAGE("Install code ordering works.")
9 ELSE(INSTALL_CODE_WITH_COMPONENT_DID_RUN)
10   MESSAGE(FATAL_ERROR "Install script 4 did not run after install with component code.")
11 ENDIF(INSTALL_CODE_WITH_COMPONENT_DID_RUN)
13 IF(CMAKE_INSTALL_COMPONENT)
14 IF(NOT "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
15   MESSAGE("CMAKE_INSTALL_COMPONENT=\"${CMAKE_INSTALL_COMPONENT}\"")
16   MESSAGE(FATAL_ERROR "Install script 4 should only run for \"Development\" INSTALL COMPONENT.")
17 ENDIF(NOT "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
18 ENDIF(CMAKE_INSTALL_COMPONENT)
20 FILE(WRITE "${CMAKE_INSTALL_PREFIX}/MyTest/InstallScript4Out.cmake"
21   "SET(CMAKE_INSTALL_SCRIPT_4_DID_RUN 1)\n"
22   )