Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345194 - Referenced projects are unnecessarily built multiple times
Summary: Referenced projects are unnecessarily built multiple times
Status: RESOLVED DUPLICATE of bug 317402
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-09 15:58 EDT by Baltasar Belyavsky CLA
Modified: 2011-05-09 16:15 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baltasar Belyavsky CLA 2011-05-09 15:58:56 EDT
Build Identifier: I20110428-0848 [Indigo M7]

This is probably a CDT-core problem, but it manifests itself during the build - if you have two projects, one referencing the other, if the active build-configuration in the referenced project is different than the one referenced from the main project, then building the main project causes the referenced project to always build twice. This can be really bad for users who have large projects which take long to build.

The cause seems to be the fact that adding a build-configuration reference (using the C/C++ General > Paths and Symbols > References tab) also adds a plain Platform project reference (Project References page).  The plain Platform project reference causes the active build-configuration in the referenced project to always build, even if it's not necessary.

Reproducible: Always

Steps to Reproduce:
1. Create two simple projects, a and b.
2. Add a build-configuration reference from a/Release to b/Release (using the C/C++ General > Paths and Symbols > References tab). Notice that a plain project reference is also added (Project References page).
3. Set the active build-configuration on project a to Release, while keeping project b at Debug.
4. Build project a.
-> The observed behaviour is that 3 builds are performed - b/Debug, b/Release, a/Release. The first build, b/Debug, should not happen.

If the plain project-reference is manually removed (through the Project References page), then the build works as expected.
Comment 1 James Blackburn CLA 2011-05-09 16:15:41 EDT
(In reply to comment #0)
> If the plain project-reference is manually removed (through the Project
> References page), then the build works as expected.

True. The problem is that other platform builders aren't run correctly.  This will be fixed when CDT starts using platform build configurations.

See also bug 309769 and bug 331031

*** This bug has been marked as a duplicate of bug 317402 ***