Patch to make cmakeManager return clean path

Benjamin Schindler bschindler at inf.ethz.ch
Sun Nov 15 17:18:02 UTC 2009


Hi

David Nolden wrote:
> Am Sonntag 15 November 2009 16:33:17 schrieb Benjamin Schindler:
>   
>> Hi
>>
>> Quite often one gets include path from cmake such as:
>> /some/build/dir//someincludeDir
>>
>> Even though such a path is valid, some comparisons fails (such as the
>> one in includepathcomputer.cpp:208:
>>
>>      m_hasPath.contains(r)
>>
>> The attached patch fixes this problem. However, I'm not sure whether
>> this is the correct solution. The m_hasPath.contains(r) should succeed imho
>>
>> Cheers
>> Benjamin
>>
>>     
>
> The patch does not look good, it attaches the same path twice, which is messy. 
>   
No, that's not true, I'm only appending a path once. But I agree that 
the patch does not look good
> Also one has to consider that retrieving include paths is already quite slow 
> in cmake, ideally the appropriate processing would be done only once while 
> parsing, and not whenever the include-paths are requested (unless of course 
> it's done that way in this patch, I haven't checked the context).
>   
I'm not quite sure what you mean here. The includepathcomputer requests 
the paths once per file and this is when this code is called. I'm not 
changing the logic of the code in any way - I just make sure I add a 
sane path to the list. But I think we should consider what Andreas said 
- the comparison in the includepathcomputer should not fail.


Cheers
Benjamin
> Greetings, David
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>   




More information about the KDevelop-devel mailing list