string tokenizer? .. was .. RE: Filter a library from the list of libraries?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

string tokenizer? .. was .. RE: Filter a library from the list of libraries?

Boost - Build mailing list
Steven,
I seem to be having a problem with $(libraries) because it hasn't been tokenized into a list, and is still all one string.
So the set manipulation (like set.difference) isn't working.
I've been searching around and I can find explicit tokenization function?
So suspect there is some simple syntax I've missed?

Many thanks,

Brian

> -----Original Message-----
> From: Boost-build [mailto:[hidden email]] On Behalf Of
> Subject: Re: [Boost-build] Filter a library from the list of libraries?
>
> AMDG
>
> On 08/21/2018 02:49 PM, Kuhl, Brian via Boost-build wrote:
> > (Many thanks to Steven on answering my last question so quickly) ..
> > My next challenge is to remove the -ldl library from the list of libraries handed
> to the shared library linker a.k.a the link.dll action.
> > I'm trying to use MATCH for this with no success.
> >
> >
> >     local libraries = [ feature.get-values     <libraries>  : $(options) ] ;
> >     toolset.flags clang-vxworks.link     LIBRARIES    : $(libraries) ;
> >
> >     # link shared libraries without libld.a
> >     for local e in $(libraries)
> >     {
> >         local dll_libs = [ MATCH "-l(?!dl)\w+" : $(e) ] ;
> >     }
> >     toolset.flags clang-vxworks.link.dll DLL_LIBS : $(dll_libs) ;
> >
> >
> > Could someone identify my issue? (perhaps something in the regex needs
> escaping?) or perhaps suggest a better method to accomplish the same thing?
> >
>
> "(?!)" is a perlism and is not supported by MATCH.
>
> https://boostorg.github.io/build/manual/develop/index.html#jam.language.rule
> s.builtins.utility._match__
>
> If you just want to remove an option, try [ set.difference $(libraries) : -ldl ]
>
> In Christ,
> Steven Watanabe
> _______________________________________________
> Unsubscribe & other changes:
> https://lists.boost.org/mailman/listinfo.cgi/boost-build
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: string tokenizer? .. was .. RE: Filter a library from the list of libraries?

Boost - Build mailing list
AMDG

On 08/23/2018 01:48 PM, Kuhl, Brian wrote:
> Steven,
> I seem to be having a problem with $(libraries) because it hasn't been tokenized into a list, and is still all one string.
> So the set manipulation (like set.difference) isn't working.
> I've been searching around and I can find explicit tokenization function?
> So suspect there is some simple syntax I've missed?
>

string.words or regex.split.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build