[cmake-developers] [PATCH] Extend copy and copy_if_different commands with support multiple files
Bartosz Kosiorek
gang65 at poczta.onet.pl
Fri Dec 4 09:18:37 EST 2015
Good Morning
Finally I manage to add wildcard support.
I have taken SimpleGlob.h library from:
https://github.com/brofield/simpleopt
It is multiplatform, which supports all UNIX glob functions/flags and
implementead as single header library.
I tested it on Linux and it is working perfectly for me.
SimpleGlob.h library you need to copy into Source/SimpleGlob.h path.
Please let me know what do you think about that solution.
If it is ok for you, I will continue testing on WIndows and OS X platforms.
Best Regards
Bartosz
2015-12-03 21:56 GMT+01:00 Bartosz Kosiorek <Bartosz.Kosiorek at tomtom.com>:
> Hello.
>
> Here is the patch with tests.
> ________________________________________
> From: Brad King <brad.king at kitware.com>
> Sent: Thursday, December 3, 2015 7:07 PM
> To: Bartosz Kosiorek
> Cc: cmake-developers at cmake.org
> Subject: Re: [cmake-developers] [PATCH] Extend copy and copy_if_different
> commands with support multiple files
>
> On 12/03/2015 12:31 PM, Bartosz Kosiorek wrote:
> > When I'm trying to run test with wildcard:
> > run_cmake_command(E_copy-wildcard-source-files-target-is-directory
> ${CMAKE_COMMAND} -E copy
> > ${RunCMake_copy_TEST_SOURCE_DIR}/directory1/*
> > ${RunCMake_copy_TEST_BINARY_DIR})
> >
> > I've got an error:
>
> The command is not running through a shell in that case so there is
> no step that expands the wildcard. This feature is not about wildcard
> expansion, but about multiple inputs to the copy. They can be
> spelled out explicitly in the command invocation, or passed through
> a variable containing a list populated by file(GLOB).
>
> -Brad
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151204/a6908090/attachment-0001.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: 7487 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151204/a6908090/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-unit-tests-for-copy-and-copy_if_different-comman.patch
Type: text/x-patch
Size: 11951 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151204/a6908090/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-support-for-glob-by-using-SimpleGlob.h-library.patch
Type: text/x-patch
Size: 10619 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151204/a6908090/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleGlob.h
Type: text/x-chdr
Size: 30984 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151204/a6908090/attachment-0001.h>
More information about the cmake-developers
mailing list