Finding APR

Matthew Woehlke mw_triad at users.sourceforge.net
Wed May 9 15:30:41 UTC 2007


Andreas Pakulat wrote:
> On 08.05.07 18:02:59, Matthew Woehlke wrote:
>> Did you look at the revision I pointed you at yet? That's exactly what I 
>> did in kdesdk :-). (Actually you want to use FIND_LIBRARY to "add lib 
>> and .so", but close enough.)
> 
> Of course I did :) Well, splitting at "-" is just as bad as splitting at
> " ", it may be inside a path as well.

Ok, from your "this might work" it sounded like you hadn't. :-)

> Anyway I'm going to build apr tomorrow locally and put it into a path
> with spaces, lets see what apr-config tells me afterwards (I'm guessing
> it will give me -Lfoo bar or -Lfoo\ bar, but no quotes).

Which means it's broken, of course ;-) but wouldn't surprise me.

>> This would work great if we could do real word splitting on the output 
>> of --link-ld... Right now I just split on spaces, which will break if 
>> there are quoted spaces in the output of --link-ld. (I was told on the 
>> CMake list that "there is no way to do this correctly using regular 
>> expressions", which to be honest I'm not convinced of
> 
> Well, you can if you ignore quotes of "", i.e. something like 
> 
> "foo\"bar"
> 
> cannot be parsed by a regexp.

It can't?

'"([^"]*(\\")*)*"' should match quoted strings with '\"' as long as they 
don't also have '\\', and it should be possible to handle that also, 
just it makes the regexpr more complicated. But it would be much, much 
easier if SEPARATE_ARGS Did The Right Thing :-(.

-- 
Matthew
"Every cloud has a silver lining (except for the mushroom shaped ones, 
which have a lining of iridium and strontium 90)" -- Sean Dwyer





More information about the KDevelop-devel mailing list