Manage multiple version of an external lib

CodeLite installation/troubleshooting forum
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Manage multiple version of an external lib

Post by jfouche »

Hi Eran

I would like to how I can manage multiple version of an external lib in the tag settings.
For example : I trying to port my application to wx2.9 so I created a branch for this. So I continue to developp trunk with 2.8.10, and begin the port in the branch.
So, if I define only one version of wxWidgets in include files for tags (let's say 2.8.10), it will be wrong for 2.9.0. If I define both, I probably will encounter problems (I think, as I didn't try). For compilation, I have to override the environment var (WXWIN) with the good version path. Well, I think, if I'm a little bit to tired, I'm gonna make some mistakes.
What is your point of view ? Do you think a future request can be open to fix this, or the actual design of CodeLite doesn't allow this use ?
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Manage multiple version of an external lib

Post by eranif »

The best solution (IMO) is to add a new 'include files' for the parser in the workspace/project level.
And provide some option (similar to the project 'Global Settings'):
Override global 'Include Files' or 'In addition to the global include files' - this way you will be able to maintain paths for the parser per project.

I would go for now for 'workspace level'

Eran
Make sure you have read the HOW TO POST thread
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Manage multiple version of an external lib

Post by jfouche »

Hi Eran

Maybe a simple wxCheckListBox for the include files can do the trick :
- If the path is checked, it can be parsed
- If not, don't try to parse it

If we use workspace settings, we can just put the wxCheckListBox in the workspace settings (not in global settings) and say which path we need for this workspace by checking the needed ones.
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Manage multiple version of an external lib

Post by eranif »

I think that having global include list + project specific list is the way to go here (similar to what you did in the project settings / common build configurations)
(it is also not that hard to implement - I already added it to my TODO list)

Eran
Make sure you have read the HOW TO POST thread
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Manage multiple version of an external lib

Post by jfouche »

For the wxWidgets tag database, I like to add all unneeded port to excude files, which is a loooong task. It would be a good idea to use the previous way to add exclude files (wxTreeCtrl with checkbox is faster to select needed directories). Actualy, we have to select the directory from a control which start from 'My computer' each time.
That's why I think we have to provide an better way (the idea of wxTreeCtrl with checkboxes could be one, but maybe you have a better idea).
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Manage multiple version of an external lib

Post by eranif »

A faster way of doing this is from the explorer tree:
- Locate the path you want to exclude and then right click it -> Tags -> Add to parser exclude path

http://codelite.org/LiteEditor/SettingUpCodeCompletion
Look at the bottom: "Tip: How to quickly add or exclude paths in the parser"

Eran
Make sure you have read the HOW TO POST thread
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Manage multiple version of an external lib

Post by jfouche »

Great, I didn't know about this.
If you set some directories to global tag settings, and some others to workspace settings, I hope that you will find a way to exclude a directory from the good one.
Thanks a lot Eran
Jérémie
Post Reply