Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
AutoDetect Yagarto?
Folco:
--- Quote ---3) Looking over the code for detecting and setting up various compilers it looks to me like compiler detect and configuration could be re-factored such that the compiler definitions and setup would be defined in an external config file. Might make it easier for other compilers to be added.
--- End quote ---
Great idea ! I could use my favourite 68000 toolchain inside C::B 8)
MortenMacFly:
--- Quote from: dasfoo on October 25, 2010, 04:20:58 am ---3) Looking over the code for detecting and setting up various compilers it looks to me like compiler detect and configuration could be re-factored such that the compiler definitions and setup would be defined in an external config file. Might make it easier for other compilers to be added.
--- End quote ---
I don't think this makes sense for two reasons:
1.) The configuration is already in XML -> in the *.conf file of Code::Blocks.
2.) Code::Blocks allows to modify every setting of a compiled through the UI of the compiler setup. In addition it allows making copies of existent compilers and change every value possible.
So I don't see how and why external config files will makes things easier...?! It would only enable to edit in a file what you can easily configure via an UI interface...?! In addition you can already edit everything in the config file of Code::Blocks if you really wanted to. But I doubt this will make things easier and especially less error-prone.
dasfoo:
--- Quote from: MortenMacFly on October 28, 2010, 02:27:41 pm ---1.) The configuration is already in XML -> in the *.conf file of Code::Blocks.
2.) Code::Blocks allows to modify every setting of a compiled through the UI of the compiler setup. In addition it allows making copies of existent compilers and change every value possible.
So I don't see how and why external config files will makes things easier...?! It would only enable to edit in a file what you can easily configure via an UI interface...?! In addition you can already edit everything in the config file of Code::Blocks if you really wanted to. But I doubt this will make things easier and especially less error-prone.
--- End quote ---
I think what you're thinking is slightly different that what I meant. (I could be just confused)
Looking at the compilergcc plug-in there are over twenty modules to detect and define the compiler options one for each compiler.
compilerGNUARM, compilerGNUAVR, compilerMSVC, compilerMSVC8, compilerMSVC10, compilerBCC, compilerDMC, compilerOW, compilerGNUARM, compilerGNUAVR, compilerGNUMSP430, compilerCYGWIN, compilerLCC, compilerYagarto, etc etc.
The code in each module looks pretty much the same duplicated over and over with small improvements in the more recent modules. And things looking kind of stale in others. The main differences are the executable names, compiler and linker options, with a few tweaks for detecting different compilers installed along with code blocks and or not in the path. Seems to me that the executable names and compiler options should be defined in xml files, and the the modules for detecting the compilers rolled into a single module, say compilerStdGcc. With nothing preventing you from doing it the old way if needed.
That would make it much easier to add a new compiler or an updated one because 95% of the time all you'd just cut and paste new xml file. Or add another compiler definition to an existing one.
Navigation
[0] Message Index
[*] Previous page
Go to full version