What exactly is the bad practice?
You should only add path's to include directories that are really required. Even such a complex framework as wx requires one (or two) includes. So settings up include path from a "root" including all sub-path's makes no sense in most cases. In fact it will lead in to trouble for sure some time in the future. Just one example scenario:
Imagine the following directory structure:
MyProject
- include
- lib_a_v1
- lib_a_v2
- lib_b
If you setup the include path's as required which maybe here:
1.) include
2.) include\lib_a_v2
3.) include\lib_b
You will never run into trouble, even though you have to setup 3 directories.
If you setup the path's recursively starting from "include" it will result in:
1.) include
2.) include\lib_a_v1
3.) include\lib_a_v2
4.) include\lib_b
Now imagine the changes from lib_a_v1 to lib_a_v2 were an additional member in a structure. You won't receive any compilation errors when the first "definition file" (header files that defines the struct) is found in lib_a_v1. This would be th case as the compiler would first find it there due to the order of the include command line switches (alphabetically) in this example case). Hence if you rely on sizeof(mystruct) for any reason you compile possibly buggy code.
So *you* should ensure you always setup the right directories yourself, even if these are many and not leave it up to any IDE. In addition I have never seen any project that requires more then let's say 10 include directories. So it shouldn't be too hard to setup those step-by-step. However - That's only my personal opinion.
With regards, Morten.
Allow multiple selections in the Project build settings / Search directories / Add dialog?
This would be an easy change: You need to change the construction of EditPathDlg in compileroptionsdlg.cpp and activate the boolean flag "allowMultiSel" in the dialog construction.
Thus for compiler/linker include dirs you need to change (starting at line 1312 in r4247):
EditPathDlg dlg(this,
m_pProject ? m_pProject->GetBasePath() : _T(""),
m_pProject ? m_pProject->GetBasePath() : _T(""),
_("Add directory"));
...into:
EditPathDlg dlg(this,
m_pProject ? m_pProject->GetBasePath() : _T(""),
m_pProject ? m_pProject->GetBasePath() : _T(""),
_("Add directory"), _T(""), true, true);
This is untested. You may want to try and (if it works properly) create a patch out of it and submit it to BerliOS.
With regards, Morten.
Edit: Of course you need to handle multiple path's then in the code that follows after this in the method. Look how it's done on other places.