diff options
author | Brad King <brad.king@kitware.com> | 2009-02-24 11:41:40 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-24 11:41:40 -0500 |
commit | 1595b8e69eac0d2dbab6ac29663a85d8d486a5cc (patch) | |
tree | ded9bc2ffe1ee4ca3adb4f19a24534877d908b85 /Tests | |
parent | a79f8cd4c156b01ef0305a30a9c0ca2dcbf9a1cc (diff) | |
download | cmake-1595b8e69eac0d2dbab6ac29663a85d8d486a5cc.tar.gz |
ENH: Add install(DIRECTORY) option 'OPTIONAL'
This adds the OPTIONAL option to the install(DIRECTORY) command. It
tells the installation rule that it is not an error if the source
directory does not exist. See issue #8394.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index c204e64100..1a87c5656d 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -270,6 +270,9 @@ ELSE(STAGE2) # Test empty directory installation. INSTALL(DIRECTORY DESTINATION MyTest/share/empty) + # Test optional directory installation. + INSTALL(DIRECTORY does-not-exist DESTINATION MyTest/share OPTIONAL) + # Test user-specified install scripts, with and without COMPONENT. INSTALL( SCRIPT InstallScript1.cmake diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index c204e64100..1a87c5656d 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -270,6 +270,9 @@ ELSE(STAGE2) # Test empty directory installation. INSTALL(DIRECTORY DESTINATION MyTest/share/empty) + # Test optional directory installation. + INSTALL(DIRECTORY does-not-exist DESTINATION MyTest/share OPTIONAL) + # Test user-specified install scripts, with and without COMPONENT. INSTALL( SCRIPT InstallScript1.cmake |