Chris Cleeland
Chris Cleeland

Reputation: 4900

Preventing eclipse from building a project?

I have a workspace that contains many projects (CDT projects, to be specific). Each project has 4 configurations, but in the future they may have more.

Project B depends on Project A.

In some configurations, I need to prevent Project A from being built.

  1. Is there a way to tell Eclipse not to build Project A for a particular configuration?
  2. If Project B depends on Project A, and we are building Project B with configuration X, and I have used one of the answers to question #1 to prevent Project A from being built in configuration X, then will the whole build fail?
  3. If the answer to #2 is "yes", can I make dependencies be per-configuration, so that in configuration X Project B will not depend upon Project A?

Upvotes: 2

Views: 487

Answers (2)

James Blackburn
James Blackburn

Reputation: 4491

This is a great question Chris. Using CDT with references between project (or references between configurations) has never worked well. There simply isn't enough information in the platform for CDT to do the right amount of building -- the result is that often too much building occurs.

There's work happening place now to fix this. The concept of Build Configurations is being added to the platform for Eclipse 3.7: bug 325489

And in CDT we're working on doing a better job of building references: bug 309769.

It's not clear from your question whether you're using CDT's built-in Managed build, or whether you're running make on your own makefiles. Either way the situation will be better as you will be able to easily define references at the configuration level in Eclipse 3.7 with CDT 8.

Upvotes: 0

Fabian Steeg
Fabian Steeg

Reputation: 45684

I'm not sure I really understand what you are trying to do, but perhaps you can configure the builders for your project under Project > Properties > Builders to do what you want (like changing order or disabling individual builders).

Upvotes: 1

Related Questions