User forums > Using Code::Blocks

Export to CMake

<< < (2/3) > >>

stahta01:

--- Quote from: seasoned_geek on November 22, 2021, 09:57:00 pm ---Really wanted Code::Blocks to work.

--- End quote ---

No, you wanted it to work without putting in a major effort on your part!

Tim S.

cacb:

--- Quote from: seasoned_geek on November 22, 2021, 02:21:57 pm ---All,

Since the CMake created Code::Blocks project doesn't allow for debugging I thought I would ask.

Does Code::Blocks provide a feature/plug-in that will correctly export a Code::Blocks project to a CMakeLists.txt file? This would neatly solve the problem.

Thanks,

--- End quote ---

I am not aware of a C::B to CMake plugin, but I wrote an experimantal C::B to premake5 plugin, see this post .

Premake is an alternative to CMake, with similar objectives. Premake can generate C::B project files. Although I realise that CMake is a de facto standard, I find premake easier to deal with.

In theory, you could use the CMake plugin for premake to generate CMakeLists.txt, but I would not bet on that working too well.

seasoned_geek:

--- Quote from: stahta01 on November 23, 2021, 02:01:07 am ---
--- Quote from: seasoned_geek on November 22, 2021, 09:57:00 pm ---Really wanted Code::Blocks to work.

--- End quote ---

No, you wanted it to work without putting in a major effort on your part!

Tim S.

--- End quote ---

Given this conversation has been around since 2014

https://forums.codeblocks.org/index.php?topic=19193.0

and CMake went to the effort of generating Code::Blocks project files, and the only thing that isn't working is debugging. That appears to be deliberately blocked. Even Gedehttp://gede.dexar.se/ can do the debugging. It doesn't care what Makefile created the objects and executable because GDB doesn't care.

seasoned_geek:

--- Quote from: cacb on November 23, 2021, 04:45:28 pm ---
I am not aware of a C::B to CMake plugin, but I wrote an experimantal C::B to premake5 plugin, see this post .

Premake is an alternative to CMake, with similar objectives. Premake can generate C::B project files. Although I realise that CMake is a de facto standard, I find premake easier to deal with.

In theory, you could use the CMake plugin for premake to generate CMakeLists.txt, but I would not bet on that working too well.

--- End quote ---

Thanks for your response. If I get time I will look into it.

For now, if they want to use Code::Blocks they have to:


* Edit CMakeLists.txt
* cmake . -G "CodeBlocks - Unix Makefiles"
* Edit and compile all of the source files. Repeating this process when they add new source files
* Use Gede to debug
I really don't know why (or maybe I just missed it) Code::Blocks doesn't have a Debug menu option that lets you navigate to a binary like Gede does. Gdb is Gdb.

AndrewCot:
You can download the CMake and/or C::B source code and find where the problem is (assuming it's not your setup as you are having allot of issues) and fix the issue and then send in a patch to the appropriate app devs following their process.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version