diff options
Diffstat (limited to 'Tests/RunCMake/file')
-rw-r--r-- | Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt | 8 | ||||
-rw-r--r-- | Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/file/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/file/from/a.txt | 0 | ||||
-rw-r--r-- | Tests/RunCMake/file/from/a/b.txt | 0 | ||||
-rw-r--r-- | Tests/RunCMake/file/from/a/b/c.txt | 0 |
9 files changed, 38 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt new file mode 100644 index 0000000..9d5f876 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt @@ -0,0 +1,15 @@ +^CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file option FILES_FROM_DIR requires all files to be specified as relative + paths\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file INSTALL option RENAME may not be combined with FILES_FROM_DIR\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file option FILES_FROM_DIR may not appear after PATTERN or REGEX\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake new file mode 100644 index 0000000..807b704 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake @@ -0,0 +1,5 @@ +set(src ${CMAKE_CURRENT_SOURCE_DIR}/from) +set(dst ${CMAKE_CURRENT_BINARY_DIR}/from) +file(INSTALL FILES ${src}/a.txt FILES_FROM_DIR ${src} DESTINATION ${dst}) +file(INSTALL FILES a.txt FILES_FROM_DIR ${src} DESTINATION ${dst} RENAME b.txt) +file(INSTALL FILES a.txt DESTINATION ${dst} PATTERN *.txt FILES_FROM_DIR) diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt new file mode 100644 index 0000000..1c3c693 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt @@ -0,0 +1,8 @@ +-- Before Installing +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a.txt +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b.txt +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b/c.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b/c.txt +-- After Installing diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake new file mode 100644 index 0000000..24e5282 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake @@ -0,0 +1,7 @@ +set(src ${CMAKE_CURRENT_SOURCE_DIR}/from) +set(dst ${CMAKE_CURRENT_BINARY_DIR}/from) +file(REMOVE RECURSE ${dst}) +message(STATUS "Before Installing") +file(INSTALL FILES a.txt a/b.txt a/b/c.txt FILES_FROM_DIR ${src} DESTINATION ${dst}) +file(INSTALL FILES a.txt a/b.txt a/b/c.txt FILES_FROM_DIR from DESTINATION ${dst}) +message(STATUS "After Installing") diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 63cbdd9..26051b4 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -8,6 +8,8 @@ run_cmake(UPLOAD-unused-argument) run_cmake(UPLOAD-httpheader-not-set) run_cmake(UPLOAD-pass-not-set) run_cmake(INSTALL-DIRECTORY) +run_cmake(INSTALL-FILES_FROM_DIR) +run_cmake(INSTALL-FILES_FROM_DIR-bad) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) run_cmake(LOCK) diff --git a/Tests/RunCMake/file/from/a.txt b/Tests/RunCMake/file/from/a.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/from/a.txt diff --git a/Tests/RunCMake/file/from/a/b.txt b/Tests/RunCMake/file/from/a/b.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/from/a/b.txt diff --git a/Tests/RunCMake/file/from/a/b/c.txt b/Tests/RunCMake/file/from/a/b/c.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/from/a/b/c.txt |