[cmake-developers] [PATCH] Extend copy and copy_if_different commands with support multiple files

Bartosz Kosiorek Bartosz.Kosiorek at tomtom.com
Wed Dec 2 19:05:54 EST 2015


Hi.


This patch allows to use multiple files in commands "copy" and "copy_if_different".
Input files could be merged with wildcards. For example:
     ./bin/cmake -E copy bin/* CMakeFiles/* file.tar dupajasia

If wrong file path were provided as input then the error will be displayed, but rest of the files will be copied. For example:
    ./bin/cmake -E copy bin/* CMakeFiles/* wrong_file file.tar dupajasia/
    Error copying file "wrong_file" to "dupajasia/".

If multipile input files were provided, then destination must be directory. Example:
    ./bin/cmake -E copy bin/* CMakeFiles/* wrong_file file.tar dupajasia/ctest
     Error: Target (copy) "dupajasia/ctest" is not a directory.

    ./bin/cmake -E copy bin/* dupajasia/ctest?
     Error: Target (copy) "dupajasia/ctest?" is not a directory.

If only one input file was provided, then destination could be either
file or directory:
     ./bin/cmake -E copy file.tar dupajasia/ctest

This path is starting point for fixing bug 15703:
?https://public.kitware.com/Bug/view.php?id=15703

Best Regards
Bartosz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151203/029ec143/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Extend-copy-and-copy_if_different-command-with-suppo.patch
Type: text/x-patch
Size: 7483 bytes
Desc: 0001-Extend-copy-and-copy_if_different-command-with-suppo.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151203/029ec143/attachment.bin>


More information about the cmake-developers mailing list