Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331639

Summary: "Exclude resource from build" files shown as excluded in all build configurations
Product: [Tools] CDT Reporter: s_z72
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: jamesblackburn+eclipse, Michael_Rennie
Version: 6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description s_z72 CLA 2010-12-02 04:50:10 EST
Suppose you have 2 build configurations, "Debug" and "Release"
In Project Explorer you set as active the "Release" configuration
Then using the C/C++ Build properties for one of the sourcefiles in the project you set the checkbox "Exlude resource from build" since that file should only be used in the "Debug" configuration
Now in the project explorer that sourcefile appears dimmed gray as it should and if you build the project it is not used.
However if you set as active the "Debug" configuration (where the "Exlude resource from build" checkbox is not set for that sourcefile) that sourcefile is still shown as excluded from build, even if it should not be. In fact if you build the project the file is used.

-- Configuration Details --
Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.cpp.product)
Installed Features:
 org.eclipse.platform 3.6.1.r361_v20100909-9gF78GrkFqw7GrsZnvz0JWNTeb6fue6896L
Comment 1 James Blackburn CLA 2010-12-02 10:21:41 EST
This is likely a duplicate of bug 329995.

Can you check whether you have indexer configuration set to 'Use active build configuration':
  Window > Preferences > Build Configuration for the indexer
?
Comment 2 s_z72 CLA 2010-12-06 09:39:11 EST
(In reply to comment #1)
> This is likely a duplicate of bug 329995.
> Can you check whether you have indexer configuration set to 'Use active build
> configuration':
>   Window > Preferences > Build Configuration for the indexer
> ?

'Use active build configuration' is not selected. 'Use the build configuration specified in the project's indexer settings' is selected instead.
And in the properties of the project in C/C++ General -> Indexer , 'Enabled project specific settings' is not checked.

In fact selecting 'Use active build configuration' solves the problem.
Comment 3 James Blackburn CLA 2010-12-06 09:42:17 EST
duplicate...

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