Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: killerbot on August 27, 2018, 02:54:46 pm

Title: cmake generator for cbp files
Post by: killerbot on August 27, 2018, 02:54:46 pm
is there anyone who has experience on using cmake to also generate codeblocks project files ?
How does it work < what is the command on cmake to activate this ?
Code
cmake ../ -G 'CodeBlocks - Unix Makefiles'


And what is the current state, at some time there were questions here to have cmake generate native cbp files, and not just based upon the also generated makefile.

And what with workspaces ... ?
Title: Re: cmake generator for cbp files
Post by: oBFusCATed on August 27, 2018, 08:06:34 pm
I'm using it daily to develop quite big commercial software...

It works well if you don't want to run or debug the resulting binaries directly. I'm fine starting the executable from the command line and attaching to already working executable.

The cmake produces a single project which has all the files in the project and every cmake target is a target in the project and could be built. Workspaces doesn't matter.

Making cmake to generate native projects is almost impossible, because our native projects probably doesn't have all the scripting features cmake provides. The vstudio generator generates native projects and I'm not sure the results are really good.
Title: Re: cmake generator for cbp files
Post by: killerbot on August 27, 2018, 09:54:06 pm
It works well if you don't want to run or debug the resulting binaries directly. I'm fine starting the executable from the command line and attaching to already working executable.


Can you then put the breakpoints within CB ?
And does the code completion works rather ok, or is it worse then whenyou would have a workspace made out of CB projects (cbp's) ?
Title: Re: cmake generator for cbp files
Post by: oBFusCATed on August 28, 2018, 09:53:13 am
The debugger works fine if you use debug -> attach. Debug -> Start doesn't work (at least for our project).
Code completion works fine (with its limitations of course). Generally CC works better if you have a single project.