Install/Source Location info in buildsystems

Andreas Pakulat apaku at gmx.de
Mon Aug 18 13:04:07 UTC 2008


Hi,

I recall we've briefly discussed this before but I can't find the thread
atm. David would like to get the information of source->install location
for headers so we should try to find a proper API/interface to do that.

I think we said that it would be easiest to put this into
IBuildSystemManager, something like IndexedString IBS::installLocation(
const IndexedString&). I'm using IndexedString here because this is
specifically for the duchain and converting from/to QString is expensive
for the amount of items that duchain wants to handle.

Another option would be similar to what I'm going to do today for the
list of files in a project. Just put a
QHash<IndexedString,IndexedString> into the Project class as cache,
filled during parsing the project files.

The last option would be doing this on the items themselves, but I think
that would be expensive to use in the language support due to needing to
convert an indexed string for a file into a project item.

Personally I'm favouring doing 1+2, i.e. provide a public API in IBS to
fetch the install location for a given item and then cache the
information during parsing in Project in a form useful for the language
support. Obviously we'd need a signal somewhere to indicate when a given
project item changes its install location and then update the cache, but
that shouldn't be much of a problem.

Andreas

-- 
You'd like to do it instantaneously, but that's too slow.




More information about the KDevelop-devel mailing list