summaryrefslogtreecommitdiffstats
path: root/Tests/SimpleInstall
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-02 20:17:56 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-02 20:17:56 (GMT)
commit60bf0531b01b641a00f6844dfd38ef803d2deda1 (patch)
tree1f39b207ca36da6e19b1ae0363836517b3e663bd /Tests/SimpleInstall
parent509764067136026cfab21e7eb83c9f03ddc1c96a (diff)
downloadCMake-60bf0531b01b641a00f6844dfd38ef803d2deda1.zip
CMake-60bf0531b01b641a00f6844dfd38ef803d2deda1.tar.gz
CMake-60bf0531b01b641a00f6844dfd38ef803d2deda1.tar.bz2
ENH: Added FILES_MATCHING option to INSTALL(DIRECTORY). This will help install a tree of header files while ignoring non-headers.
Diffstat (limited to 'Tests/SimpleInstall')
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 2f181ef..25b54ab 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -97,6 +97,12 @@ IF(STAGE2)
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/CMakeLists.txt")
MESSAGE(FATAL_ERROR "Directory installation installed CMakeLists.txt.")
ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/CMakeLists.txt")
+ IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/alt/TestSubDir/TSD.h")
+ MESSAGE(FATAL_ERROR "Directory installation did not install alternate TSD.h")
+ ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/alt/TestSubDir/TSD.h")
+ IF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/alt/TestSubDir/TSD.cxx")
+ MESSAGE(FATAL_ERROR "Directory installation installed alternate TSD.cxx")
+ ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/alt/TestSubDir/TSD.cxx")
# Check that scripts properly installed.
IF(WIN32 AND NOT CYGWIN)
@@ -248,6 +254,13 @@ ELSE(STAGE2)
PATTERN "CVS" EXCLUDE
REGEX "\\.txt$" EXCLUDE
)
+ INSTALL(
+ DIRECTORY TestSubDir DESTINATION MyTest/share/alt
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE
+ DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ FILES_MATCHING PATTERN "*.h"
+ )
# Test empty directory installation.
INSTALL(DIRECTORY DESTINATION MyTest/share/empty)