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

Bug 328363

Summary: Tool Settings Configurations Are Not Kept Separate
Product: [Tools] CDT Reporter: jd <jdahl1972>
Component: cdt-build-managedAssignee: Project Inbox <cdt-build-managed-inbox>
Status: RESOLVED INVALID QA Contact: Chris Recoskie <recoskie>
Severity: normal    
Priority: P3 CC: cdtdoug, jamesblackburn+eclipse
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description jd CLA 2010-10-21 10:51:56 EDT
Build Identifier: 20100917-0705

If you set the library search path in a configuration, those settings are reflected in all other configurations.

I have Debug and Release configurations. If I set the Library search path (-L) in the Debug configuration to "${workspace_loc:/sktypgwy/Debug}" the same entry is in the Release configuration. The Release configuration should have "${workspace_loc:/sktypgwy/Release}"

Reproducible: Always

Steps to Reproduce:
1. Create Debug and Release configurations (if needed) and choose Debug configuration
2. Set the Library search path (-L) to a Debug location (file path or workspace path)
3. Now select the Release configuration. LLibrary search path (-L) in Debug configuration is in Release configuration
Comment 1 Andrew Gvozdev CLA 2010-10-22 10:05:21 EDT
(In reply to comment #0)
> Steps to Reproduce:
> 1. Create Debug and Release configurations (if needed) and choose Debug
> configuration
> 2. Set the Library search path (-L) to a Debug location (file path or workspace
> path)
> 3. Now select the Release configuration. LLibrary search path (-L) in Debug
> configuration is in Release configuration
I cannot reproduce that. I entered library search path in Debug configuration and it does not appear in Release configuration. What kind of project is it?
Comment 2 James Blackburn CLA 2010-10-22 10:08:48 EDT
Just to add this works here too... We use this feature on big project sets with lots of configurations and haven't seen an issue like this.
Comment 3 jd CLA 2010-10-22 10:36:44 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > Steps to Reproduce:
> > 1. Create Debug and Release configurations (if needed) and choose Debug
> > configuration
> > 2. Set the Library search path (-L) to a Debug location (file path or workspace
> > path)
> > 3. Now select the Release configuration. LLibrary search path (-L) in Debug
> > configuration is in Release configuration
> I cannot reproduce that. I entered library search path in Debug configuration
> and it does not appear in Release configuration. What kind of project is it?

Its a shared library project. What I'm doing is setting most of the paths and libraries in 'All Configurations' and then modifying/adding the Library search path for projects I'm working on in the workspace depending upon whether is is Debug or Release. Is this the standard way to go or should I set the configurations individually? Seems like a lot of double work if so.
Comment 4 James Blackburn CLA 2010-10-22 10:38:30 EDT
(In reply to comment #3)
> What I'm doing is setting most of the paths and
> libraries in 'All Configurations' and then modifying/adding the Library search
> ...

And this is completely different from the reproduction steps you listed at the outset.  
Could you give a simple 1, 2, 3 to reproduce the problem?
Comment 5 jd CLA 2010-10-22 11:02:11 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > What I'm doing is setting most of the paths and
> > libraries in 'All Configurations' and then modifying/adding the Library search
> > ...
> 
> And this is completely different from the reproduction steps you listed at the
> outset.  
> Could you give a simple 1, 2, 3 to reproduce the problem?

Yes, I realized that this morning.

1. Create a library project(prja) with a simple class with cpp file and build project to 
create Debug folder
2. Create executable project(prjb) with main function using simple class in prja
3. In projb 'All Configurations', add Libraries (-l) prja
4. In projb 'Debug' configuration, add workspace path to prja/Debug in Library search path (-L)
5. Change to projb 'All Configurations' and the workspace path to prja/Debug folder shows up in Library search path (-L).

I don't know if this is the intended result in #5. Maybe I just misunderstood what 'All Configurations' actually was meant for. If so, I apologize for the misunderstanding.
Comment 6 Andrew Gvozdev CLA 2010-10-22 11:11:01 EDT
You (In reply to comment #5)
> (In reply to comment #4)
> 4. In projb 'Debug' configuration, add workspace path to prja/Debug in Library
> search path (-L)
Here you specified "Debug" explicitly so it will be shown. If you want to specify configuration name try ${ConfigName} instead. I believe it should work.
Comment 7 James Blackburn CLA 2010-10-22 11:18:06 EDT
(In reply to comment #5)
> 5. Change to projb 'All Configurations' and the workspace path to prja/Debug
> folder shows up in Library search path (-L).

Ah. I think this is just the view mode. If you look at the release configuration itself, you shouldn't see the path set.

You can configure how eclipse data when multiple configurations are selected:
 Window > Preferences > C/C++ > Property Pages Settings > Multiple Configurations Edit
Comment 8 jd CLA 2010-10-22 11:26:11 EDT
(In reply to comment #6)
> You (In reply to comment #5)
> > (In reply to comment #4)
> > 4. In projb 'Debug' configuration, add workspace path to prja/Debug in Library
> > search path (-L)
> Here you specified "Debug" explicitly so it will be shown. If you want to
> specify configuration name try ${ConfigName} instead. I believe it should work.

That worked. Thanks Andrew.
Comment 9 Andrew Gvozdev CLA 2010-10-22 11:27:36 EDT
Alright, closing since it is not really a bug.