Ok, I see two solutions to this, which can be combined:
1) Compilers being a child of target and project Suppose you have a
target with a
MinGW's -g option.
Now you select
MSVC on the same
target: all the options are cleared for the
MSVC compiler (since they are invalid in MSVC).
And now, you will want to "port" some of the switches to MSVC, then you go back and forth between MSVC and GCC.
This haves two benefits: no settings is lost at all, never. No setting is invalid at any moment.
And a side benefit: We can put in the C::B toolbar, a "Current compiler" combobox, so you can select the current compiler at a
project level (which would come very handy). Thus, without requiring you to make different targets when using different compilers (but you can still make different targets if you wish).
The dependency tree would be then:
Workspace
Projects
Targets
CompilersInstead of the current
Workspace
Projects
Targets[compiler]2) Common options between compilersThis is the easy part because it has been said that it will be done:
In the new xml compiler framework, sets of
common options between compilers will exist.
Example:
Debugging on
MinGW: -g
MSVC: /Zi
DMars: -v
Optimize for size
MinGW: -Os -s
MSVC: /Os /O1
DMars: -O1and so on.
Note: this is
not an entire mapping of settings from one compiler to another.
With this two solutions combined, most bold problems are solved in this topic.
In addition, a 3rd. solution can be added:
3) ToDo list of settings left to translate A little wizard settings exporter from one compiler to another (fine-grained):
A floating window would appear, with the settings of the compiler 1 you need to translate at hand to the compiler 2.
And once you have found how do you want to translate eg.
MSVC's /W1 to MinGW, that item will be removed from the list.
So this would be something like a little ToDo list of settings left to translate.