[cmake-developers] Using the internal Code::Blocks builder

Benjamin Eikel cmake at eikel.org
Wed Sep 5 11:51:07 EDT 2012


Dear CMake developers,

I wanted to know if it is possible to let CMake generate a project that uses 
the internal build system of the Code::Blocks IDE.
My motivation for this was that a friend of mine, who works together with me 
on different projects that use CMake, uses Code::Blocks for years. He tried 
CMake's Code::Blocks generator with Makefiles several times and has never been 
satisfied (parallel builds not working, stopping of build not working, slow 
make on Windows etc.). He ended up creating a Code::Blocks project manually.
I have written a number of hacks that modify the existing Code::Blocks 
generator to generate a project that does not use the generated Makefile, but 
the build system of Code::Blocks instead. I do not intend to push these 
patches, they were only ment as a proof-of-concept implementation. With these 
patches applied I am able to build several of our projects (shared libraries, 
dependencies on external libraries, applications using them) with the 
generated Code::Blocks project.
My questions to you are:
1. Is the CMake community interested in a project generator for CMake that 
generates native Code::Blocks projects? If you say that this is something that 
you do not want to have, I will stop my work and give my friend a custom CMake 
build containing my hacks. If you are nothing loath to have such generator, I 
want to try to find a way to do it right and prepare a topic branch.
2. What would be the right way to write such a generator? I think modifying 
the cmExtraCodeBlocksGenerator class is not the right way. Maybe one would 
have to write a new subclass of cmGlobalGenerator?

Kind regards
Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Dirty-hack-to-use-Code-Blocks-internal-builder-witho.patch
Type: text/x-patch
Size: 2583 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0018.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Build-a-virtual-target-All-referencing-all-other-tar.patch
Type: text/x-patch
Size: 1825 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0019.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Always-run-CMake-as-pre-build-step.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0020.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Do-not-generate-all-global-and-fast-targets.patch
Type: text/x-patch
Size: 2893 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0021.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Do-not-create-MakeCommands.patch
Type: text/x-patch
Size: 1392 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0022.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-link-dependencies-targets-or-external-libs.patch
Type: text/x-patch
Size: 1602 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0023.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Assign-units-to-targets.patch
Type: text/x-patch
Size: 3186 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0024.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Add-COMPILE_DEFINITIONS-for-the-target.patch
Type: text/x-patch
Size: 1330 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0025.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Remove-l-at-beginning-of-link-dependencies.patch
Type: text/x-patch
Size: 1428 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120905/27f804b2/attachment-0026.bin>


More information about the cmake-developers mailing list