Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Programmatically excluding files from build "on-the-fly"

James Blackburn wrote:
We do something similar.  We have a number of different processor
cores to support.  In general we've been able to pull out the features
from the hardware specific bits to make the two effectively
orthogonal.  So in our IDE we let users choose a system chip type,
separate from a SDK version.  CDT then 'magically' pulls in the
correct include/library/pre-proc defines for the combination of chip +
sdk_ver.  They can select which SDK features they final program
they're building wants, which translates to linking against the
various libraries.

If you can split the problem along these lines then you may be able to
avoid the nightmare of a large matrix containing every possible
combination of feature and platform.  Apart from anything else, if you
can model it as CDT configurations then the indexer, code navigation,
etc. have a hope of working.

Another thing you can do is modularize the software and put the
orthogonal parts in different CDT projects with references between the
configurations.  We've scaled this to an 80 project, project set now
(and with the upcoming build configuration platform improvements) it
performs really well.

At first I didn't understand what you meant here, due to my unfamiliarity with Eclipse and CDT. I was working from the assumption that there is a flat list of independent configurations of which exactly one is active at any time. You have made me go and do some research and find out about configuration references - thanks for that! :) I think I see what you're getting at now.

If I understand correctly, this approach would require, as you say, to compile the OS into libraries beforehand, since configurations can export libraries, but not source locations. That would be a bit of a departure from what we have done in the past (the reasons for which are not my area of expertise), so whether to follow that path would be a somewhat more involved decision.

Apart from anything else, if you
can model it as CDT configurations then the indexer, code navigation,
etc. have a hope of working.

I'm confused, are you saying that I wouldn't get that in the resource- filter/source-path-exclusion scenarios? Doesn't the indexer index the same set of files as goes into the build?

 -Christian


Back to the top