Can C++ support cope with changing include dirs?

David Nolden zwabel at googlemail.com
Wed Feb 10 14:12:29 UTC 2010


Am Samstag 06 Februar 2010 08:41:55 schrieb Andreas Pakulat:
> Hi,
> 
> for the custom buildsystem support I'm working on, I'd like to add a
> builddir-switcher to the project tree. The idea is to make it easy to
> switch between different builddirs of the same source tree (in my
> particular case I have 2-4 builddirs with different Qt libs and
> different features in the project turned on).
> 
> The thing I'm not sure about: Is the C++ support able to work with that?
> I'm concerned about wether or not there's a way to let it reparse all
> files when the includes and/or defines changed and wether the DUChain is
> able to handle this properly, so that it doesn't have to completely
> reparse everything once I've enabled all builddirs at least once.
> 
> Obviously I want things such as code-completion of non-project classes
> work properly once I've changed builddirs.
> 
> Or am I better off using separate sessions for each builddir (which
> would suck royally, but well...)?

Theoretically this could be done through the environment-management, where 
each chosen build-configuration would be a statically different environment. 
It would mean that the duchain would contain several copies of the data, one 
for each environment aka. build-dir.

The same problem applies to the build-dirs in the cmake support, so maybe it 
would be good to encode this whole problem as "Configurations", and then let 
the c++ support create duchain copies based on configuration.

Greetings, David




More information about the KDevelop-devel mailing list