diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-14 20:49:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-15 12:47:07 (GMT) |
commit | 8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df (patch) | |
tree | 2feeb011b4f19309ba6d9b53255862575e35daef /Tests/RunCMake/CommandLine | |
parent | f8107e7c6bc007d6b00a2ba11dfd685a4606824a (diff) | |
download | CMake-8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df.zip CMake-8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df.tar.gz CMake-8d9069e5b667e1b6d7f1eaea52ae88eb31d7d0df.tar.bz2 |
cmake -E copy: Add support for -t argument
Fixes: #23543
Diffstat (limited to 'Tests/RunCMake/CommandLine')
3 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-stderr.txt new file mode 100644 index 0000000..9504216 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-t-argument-target-is-file-stderr.txt @@ -0,0 +1 @@ +^Error: Target \(for copy command\).* is not a directory.$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 327b772..c89922a 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -574,6 +574,12 @@ run_cmake_command(E_copy-three-source-files-target-is-file ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}/f1.txt) run_cmake_command(E_copy-two-good-and-one-bad-source-files-target-is-directory ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/not_existing_file.bad ${in}/f3.txt ${out}) +run_cmake_command(E_copy-t-argument + ${CMAKE_COMMAND} -E copy ${in}/f1.txt -t ${out} ${in}/f3.txt) +run_cmake_command(E_copy-t-argument-target-is-file + ${CMAKE_COMMAND} -E copy ${in}/f1.txt -t ${out}/f1.txt ${in}/f3.txt) +run_cmake_command(E_copy-t-argument-no-source-files + ${CMAKE_COMMAND} -E copy -t ${out}) run_cmake_command(E_copy_if_different-one-source-directory-target-is-directory ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${out}) run_cmake_command(E_copy_if_different-three-source-files-target-is-directory |