[CMake] Globbing expression

Arnaud Devalkeneer adevalkeneer at gmail.com
Mon Jul 13 08:08:29 EDT 2009


Thanks a lot Marcel.

Another should be :
- make a second GLOB expression gathering all libraries you do not need
- make a LIST( REMOVE_ITEM FIRST_GLOB_RESULT SECOND_BLOG_RESULT)
but I suspect your solution is much efficient...

One additionnal question : do you know how to trigger the GLOB command just
before a link target handling.
Because in my case, the GLOB command is running at the beginning of the
compilation process, regardless
the fact that I need to link to some .so's that have not been built yet.
Is a custom target is a right way?

Thanks again,
Arnaud.


On Mon, Jul 13, 2009 at 10:58 AM, Marcel Loose <loose at astron.nl> wrote:

> Hi Arnaud,
>
> Your mixing globbing with regular expressions. AFAIK it is not possible
> to do this with one statement. I would just glob for all *.so files and
> then use string(REGEX REPLACE ...) to replace occurrences of '^libA.*
> \.so' with an empty string.
>
> Best regards,
> Marcel Loose.
>
> On Mon, 2009-07-13 at 10:43 +0200, Arnaud Devalkeneer wrote:
> > Hello everybody,
> >
> > I would like to know if there exists a way to find all files in a
> > directory with a custom file extension (e.g. *.so) except files
> > beginning by a
> > custom string (here libA). For example I am using the line :
> >
> > FILE( GLOB RESULT path/[^libA]*.so )
> >
> > but the RESULT variable remains empty. Of cource I am sure of *.so
> > files existance in the path.
> >
> > Has anybody already tried to glob files in a directory, excluding some
> > file name patterns?
> > Thank you in advance for your help.
> >
> > Enjoy Cmake,
> > Arnaud.
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090713/4b55c72c/attachment.htm>


More information about the CMake mailing list