Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Support for CodeBlocks in CMake
MortenMacFly:
--- Quote from: alex.neundorf on August 28, 2007, 04:37:56 pm ---Which compilers (with which names) are supported ?
--- End quote ---
Depends on what compiler plugins are enabled (included in compilation). Usually these are at least:
bcc, cygwin, dmc, dmd, gcc, gdc, gnuarm, gnuavr, icc, lcc, mingw, mscv, msvc8, ow, sdcc, tcc. ;-)
--- Quote from: alex.neundorf on August 28, 2007, 04:37:56 pm ---How does it do that ? Does it parse the code itself or does it use some tool ?
--- End quote ---
C::B utilises an own parser.
--- Quote from: alex.neundorf on August 28, 2007, 04:37:56 pm ---How does the xml look for that ?
--- End quote ---
Here is a snippet for includes at compiler and linker level:
--- Code: --- <Target title="my_target">
[...]
<Compiler>
[...]
<Add directory="include\tinyxml" />
</Compiler>
<Linker>
[...]
<Add directory="lib\tinyxml" />
</Linker>
</Target>
--- End code ---
I hope this helps,
With regards, Morten.
MortenMacFly:
--- Quote from: MortenMacFly on August 28, 2007, 04:56:33 pm ---Here is a snippet for includes at compiler and linker level:
[...]
--- End quote ---
BTW: there is also a possibility at extension level. For CC (CodeCompletion) you can also add and/or modify the extension node as following:
--- Code: --- <Project>
<Extensions>
<code_completion>
<search_path add="include/tinxml" />
</code_completion>
</Extensions>
</Project>
--- End code ---
This is the same as if you would add those directories for CC *only* at project level. CC (if enabled within C::B) provides an appropriate GUI in the project settings.
With regards, Morten.
thomas:
You might consider scripting Code::Blocks from CMake in the future. Not now, but keep the idea in the back of your head as an idea.
A while back, support for running scripts passed via the command line was added. This was done for the ReactOS build system, which is creating Code::Blocks project files from scratch using a complicated script and binutils.
Since this involves a lot of pain for the one particular person who has to maintain it, a better solution was sought by calling Code::Blocks with a script file telling it what to do, and letting the IDE do the actual work natively.
Unluckily, it doesn't quite work as I would like it to at the present time, since file/path handling in Code::Blocks is a nightmare. If you create a project programmatically, the resulting paths are all different than if you create the project from within the IDE, which kind of makes it all a bit pointless, as the resulting project is a mess :(
But one day, we will hopefully use an unambiguous, unified system to handle paths and files, and when all the different components stop doing their own thing, it should work.
Once it works reliably though, you will be able to tell Code::Blocks to make a project with the files you want, add the options you want, etc. without ever having to worry what the project file looks like, or that we might change it some day, you can't get it wrong.
alex.neundorf:
--- Quote from: MortenMacFly on August 28, 2007, 04:56:33 pm ---
--- Quote from: alex.neundorf on August 28, 2007, 04:37:56 pm ---Which compilers (with which names) are supported ?
--- End quote ---
Depends on what compiler plugins are enabled (included in compilation). Usually these are at least:
bcc, cygwin, dmc, dmd, gcc, gdc, gnuarm, gnuavr, icc, lcc, mingw, mscv, msvc8, ow, sdcc, tcc. ;-)
--- End quote ---
bcc: Borland
cygwin: cygwin gcc
dmc/dmd: is this the D compiler ?
gcc: gcc
gnuarm: gcc (where's there difference ?)
gnuavr: gcc (as above)
icc: Intel
lcc: lcc
mingw: gcc with windows paths or with msys paths ?
msvc: msvc 6 + 7 ?
msvc8: I guess msvc 8 :-)
ow: ?
sdcc: sdcc
tcc: ?
--- Quote from: MortenMacFly on August 28, 2007, 04:56:33 pm ---
--- Quote from: alex.neundorf on August 28, 2007, 04:37:56 pm ---How does the xml look for that ?
--- End quote ---
Here is a snippet for includes at compiler and linker level:
--- Code: --- <Target title="my_target">
[...]
<Compiler>
[...]
<Add directory="include\tinyxml" />
</Compiler>
<Linker>
[...]
<Add directory="lib\tinyxml" />
</Linker>
</Target>
--- End code ---
--- End quote ---
I guess the directories in the compiler section are used for the autocompletion.
Which purpose have the directories in the linker section ?
Does this work also with full paths ?
Which slashes are required, backslashes on Windows and forward slashes on Unix ?
Thanks
Alex
thomas:
--- Quote ---I guess the directories in the compiler section are used for the autocompletion.
Which purpose have the directories in the linker section ?
--- End quote ---
Has nothing to do with code completion (primarily). Those are the include search dirs for the compiler and the object search dirs for the linker, respectively. Code completion uses the compiler's include dirs, too, but that is more incidential.
--- Quote ---Which slashes are required, backslashes on Windows and forward slashes on Unix ?
--- End quote ---
Slashes should always work, they should be converted to backslashes if needed. You can of course use backslashes for Windows, but that makes it more complicated for you.
EDIT:
--- Quote ---mingw: gcc with windows paths or with msys paths ?
--- End quote ---
gcc natively on Windows32, no MSYS or Cygwin or whatever involved. Funnily, it's simply called "gcc" on my system, but that might be a relict from long long long ago, since I'm still using the same config as years ago.
--- Quote ---tcc: ?
--- End quote ---
Tiny C Compiler. Very cool thing, but realistically it's probably of little or no significance.
If you have gcc/mingw, then you are probably making 90% of your users happy already. The intel compiler is one-way-compatible to gcc, and neither bcc nor msvc/msvc8, nor dmc are available on non-Windows platforms, so I don't think one would want to use them for a portable project anyway.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version