summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-05 15:31:57 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-05 15:31:57 (GMT)
commit934c804ea44236baa59369cd28b018430d1b5b1d (patch)
treed458bbefcd53727690ad2dc9bde9eccc07269bc1 /Tests
parent16b781360c5d1f0264047596711d11dcb5b768a9 (diff)
downloadCMake-934c804ea44236baa59369cd28b018430d1b5b1d.zip
CMake-934c804ea44236baa59369cd28b018430d1b5b1d.tar.gz
CMake-934c804ea44236baa59369cd28b018430d1b5b1d.tar.bz2
ENH: Added OPTIONAL option to INSTALL command to allow installation of files if they exist while ignoring them otherwise. This addresses bug#2922.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt3
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt3
2 files changed, 6 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index a99f6d3..564b4fa 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -166,6 +166,9 @@ ELSE(STAGE2)
)
INSTALL_FILES(/MyTest/include FILES lib3.h)
+ # Test optional installation.
+ INSTALL(FILES does_not_exist.h DESTINATION MyTest/include/foo OPTIONAL)
+
# Test configuration-specific installation.
INSTALL(FILES lib1.h RENAME lib1release.h CONFIGURATIONS Release
DESTINATION MyTest/include/Release
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index a99f6d3..564b4fa 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -166,6 +166,9 @@ ELSE(STAGE2)
)
INSTALL_FILES(/MyTest/include FILES lib3.h)
+ # Test optional installation.
+ INSTALL(FILES does_not_exist.h DESTINATION MyTest/include/foo OPTIONAL)
+
# Test configuration-specific installation.
INSTALL(FILES lib1.h RENAME lib1release.h CONFIGURATIONS Release
DESTINATION MyTest/include/Release