summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorYves Frederix <yves.frederix@gmail.com>2016-01-12 20:01:07 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-13 14:02:06 (GMT)
commit630c8aa8435fced988545d396714398faa3426b1 (patch)
tree9cae7d2f3ddd216a6f03c777b5cbddc01527e54d /Tests
parentb5009720d3020021f189570d72c099963795a5c5 (diff)
downloadCMake-630c8aa8435fced988545d396714398faa3426b1.zip
CMake-630c8aa8435fced988545d396714398faa3426b1.tar.gz
CMake-630c8aa8435fced988545d396714398faa3426b1.tar.bz2
install: Allow generator expressions in DIRECTORY
Teach install(DIRECTORY) to support generator expressions in the list of directories, much like install(FILES) already supports.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-result.txt1
-rw-r--r--Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-stderr.txt6
-rw-r--r--Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad.cmake1
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake1
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt4
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt4
7 files changed, 14 insertions, 5 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index aedc89b..dcba9ac 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -551,5 +551,5 @@ install(
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include/abs
)
-install(DIRECTORY include/abs DESTINATION $<1:include>$<0:/wrong>)
+install(DIRECTORY $<1:include/abs>$<0:/wrong> DESTINATION $<1:include>$<0:/wrong>)
install(EXPORT expAbs NAMESPACE expAbs_ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/expAbs)
diff --git a/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-result.txt b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-stderr.txt b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-stderr.txt
new file mode 100644
index 0000000..9844158
--- /dev/null
+++ b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<NOTAGENEX>
+
+ Expression did not evaluate to a known generator expression
diff --git a/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad.cmake b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad.cmake
new file mode 100644
index 0000000..ec0436d
--- /dev/null
+++ b/Tests/RunCMake/install/DIRECTORY-DIRECTORY-bad.cmake
@@ -0,0 +1 @@
+install(DIRECTORY $<NOTAGENEX> DESTINATION .)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 043bd1f..2c1b29d 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ run_cmake(DIRECTORY-message-lazy)
run_cmake(SkipInstallRulesWarning)
run_cmake(SkipInstallRulesNoWarning1)
run_cmake(SkipInstallRulesNoWarning2)
+run_cmake(DIRECTORY-DIRECTORY-bad)
run_cmake(DIRECTORY-DESTINATION-bad)
run_cmake(FILES-DESTINATION-bad)
run_cmake(TARGETS-DESTINATION-bad)
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index e365076..2737f18 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -252,7 +252,7 @@ else()
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/CVS")
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/CVS")
install(
- DIRECTORY TestSubDir scripts/ DESTINATION $<1:MyTest/share>$<0:/wrong>
+ DIRECTORY TestSubDir $<1:scripts/>$<0:/wrong> DESTINATION $<1:MyTest/share>$<0:/wrong>
FILE_PERMISSIONS OWNER_READ OWNER_WRITE
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
@@ -263,7 +263,7 @@ else()
# Alternate directory installation for coverage.
install(
- DIRECTORY scripts/ DESTINATION $<1:MyTest/share/alt>$<0:/wrong>
+ DIRECTORY $<1:scripts/>$<0:/wrong> DESTINATION $<1:MyTest/share/alt>$<0:/wrong>
COMPONENT Development
USE_SOURCE_PERMISSIONS
PATTERN "CVS" EXCLUDE
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index e365076..2737f18 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -252,7 +252,7 @@ else()
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/CVS")
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/CVS")
install(
- DIRECTORY TestSubDir scripts/ DESTINATION $<1:MyTest/share>$<0:/wrong>
+ DIRECTORY TestSubDir $<1:scripts/>$<0:/wrong> DESTINATION $<1:MyTest/share>$<0:/wrong>
FILE_PERMISSIONS OWNER_READ OWNER_WRITE
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
@@ -263,7 +263,7 @@ else()
# Alternate directory installation for coverage.
install(
- DIRECTORY scripts/ DESTINATION $<1:MyTest/share/alt>$<0:/wrong>
+ DIRECTORY $<1:scripts/>$<0:/wrong> DESTINATION $<1:MyTest/share/alt>$<0:/wrong>
COMPONENT Development
USE_SOURCE_PERMISSIONS
PATTERN "CVS" EXCLUDE