Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Compiler settings (not the dialog)
mandrav:
Back to our favorite issue: compiler settings (not the dialog) :).
You probably have seen this thread about the new wizard plugin WIP.
While developing a few wizards for it, it became apparent that the way compiler options are setup should change to be compiler-neutral. Let me explain:
CompilerConfigurationSwitchesGCCDebug-g -O0MSVCTKDebug/Zi /D_DEBUG /DDEBUG.........
As you see above, each compiler is using completely different command-line switches for the same options (obviously).
With the way compiler options are setup now, one cannot easily switch between compilers without causing problems. That's because compiler options are not automatically converted between compilers.
What we could do is define some common group of options, common to all compilers.
Then, in the compiler options dialog, instead of having a list of on/off options, we could have a list of pre-defined settings groups (like "Debugging" above). The advantage would be that the compiler plugin wouldn't store the options as a string but rather the group settings. Something like, "debugging enabled, optimization disabled, C++ exception handling enabled". Not "-g -O0 -fexceptions". The actual command-line compiler switches would be passed to the compiler when a command-line is constructed.
This would allow us to switch between compilers and the settings would still work because we wouldn't have stored anything compiler specific but rather abstract groups of settings.
It would also make the compiler settings dialog more clear for the new user...
I hope the above make some sense, because it's not long since I woke up and coffee hasn't yet effected on me ;)
Trikko:
Yes it's what i would do by myself using global and "target" vars. Did you remember topic about "global var visibility"? (Did you fixed the "bug"?)
I've just thought about some common settings:
- Defines
- Include path!
- Debug info
- Precompiled Headers
- Optimization: space/speed
- Warning as error
Usually these settings exist, if not you can simply ignore them...
BTW common settings are overridden by compiler ones, aren't them? It could be useful to select if you want to override or append them...
A more funny features could be a modular config/target method using a tree structure, but i just know that you don't like to implement it...
Michael:
--- Quote from: mandrav on February 27, 2006, 10:00:23 am ---What we could do is define some common group of options, common to all compilers.
Then, in the compiler options dialog, instead of having a list of on/off options, we could have a list of pre-defined settings groups (like "Debugging" above). The advantage would be that the compiler plugin wouldn't store the options as a string but rather the group settings. Something like, "debugging enabled, optimization disabled, C++ exception handling enabled". Not "-g -O0 -fexceptions". The actual command-line compiler switches would be passed to the compiler when a command-line is constructed.
This would allow us to switch between compilers and the settings would still work because we wouldn't have stored anything compiler specific but rather abstract groups of settings.
It would also make the compiler settings dialog more clear for the new user...
I hope the above make some sense, because it's not long since I woke up and coffee hasn't yet effected on me ;)
--- End quote ---
Yes, it makes a lot of sense :D. IMHO it is a very good idea. Anyway, I have just a small question. What would happen if I would like to chose specific options for e.g., debugging and not all the options of the common group "debugging"?
Thank you very much.
Best wishes,
Michael
mandrav:
--- Quote ---What would happen if I would like to chose specific options for e.g., debugging and not all the options of the common group "debugging"?
--- End quote ---
Among the other pre-defined groups, we 'll have one called "Custom settings". This will be stored as a raw string. You can put all your custom settings there (manually). Needless to say you will lose them when you switch compilers for your project...
Michael:
--- Quote from: mandrav on February 27, 2006, 10:49:45 am ---Among the other pre-defined groups, we 'll have one called "Custom settings". This will be stored as a raw string. You can put all your custom settings there (manually).
--- End quote ---
Ok, I understand. Thanks for the answer :).
--- Quote from: mandrav on February 27, 2006, 10:49:45 am ---Needless to say you will lose them when you switch compilers for your project...
--- End quote ---
Yes, of course.
Best wishes,
Michael
Navigation
[0] Message Index
[#] Next page
Go to full version