diff options
author | Brad King <brad.king@kitware.com> | 2006-08-29 19:04:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-29 19:04:29 (GMT) |
commit | 27a67fb72f22bcff5007b45d96ed810405818833 (patch) | |
tree | 5aab2eccb41f5483c7211933023640268825d1fe /Tests/SimpleInstall/CMakeLists.txt | |
parent | 7001a88a746073a46200dde7c6613789cf4b9cc8 (diff) | |
download | CMake-27a67fb72f22bcff5007b45d96ed810405818833.zip CMake-27a67fb72f22bcff5007b45d96ed810405818833.tar.gz CMake-27a67fb72f22bcff5007b45d96ed810405818833.tar.bz2 |
ENH: Add support to INSTALL(DIRECTORY) to install an empty directory. This addresses bug#3572.
Diffstat (limited to 'Tests/SimpleInstall/CMakeLists.txt')
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 4559f08..a99f6d3 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -107,6 +107,15 @@ IF(STAGE2) MESSAGE(FATAL_ERROR "Bad sample script output: [${SAMPLE_SCRIPT_OUTPUT}]") ENDIF(NOT "${SAMPLE_SCRIPT_OUTPUT}" MATCHES "Sample Script Output") + # Check for failure of empty directory installation. + IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/empty") + MESSAGE(FATAL_ERROR "Empty directory installation did not install.") + ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/empty") + FILE(GLOB EMPTY_FILES "${CMAKE_INSTALL_PREFIX}/MyTest/share/empty/*") + IF(EMPTY_FILES) + MESSAGE(FATAL_ERROR "Empty directory installed [${EMPTY_FILES}].") + ENDIF(EMPTY_FILES) + # Make sure the test executable can run from the install tree. SET_TARGET_PROPERTIES(SimpleInstallS2 PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib) @@ -174,6 +183,9 @@ ELSE(STAGE2) PATTERN "scripts/*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ ) + # Test empty directory installation. + INSTALL(DIRECTORY DESTINATION MyTest/share/empty) + # Test user-specified install scripts. INSTALL( SCRIPT InstallScript1.cmake |