News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

CMake Code::Blocks Generator Deprecation

Started by inversesquare.zip, September 25, 2023, 01:05:59 AM

Previous topic - Next topic

inversesquare.zip

Hello,
I've noticed several other people have requested how to use CMake with Code::Blocks and have been told to run a command like the following:
Quote from: seasoned_geek on November 23, 2021, 05:19:41 PM
[snipped]
cmake . -G "CodeBlocks - Unix Makefiles"
[snipped]

However, that command is part of Extra Generators [1] which is, as mentioned in the description, deprecated. According to the CMake documentation, "support for Extra Generators is deprecated and will be removed from a future version of CMake." Is anyone planning on making Code::Blocks work with CMake some other way? Thank you for your time.

[1]https://cmake.org/cmake/help/latest/generator/CodeBlocks.html
I wanted to be called ziproot, but the filter flagged it as having the word "root" in it. Apparently people think someone named "ziproot" is the root user.

HunterZ

Wondering about this as well. This is making me hesitate to get too deep into Code::Blocks because CMake integration is a must.

Kitware seems to be encouraging IDE developers to integrate with their cmake-file-api: https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html

stahta01

Since they never really supported native CB Projects. Them dropping support for CB Custom makefile projects are not a major loss.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ollydbg

Quote from: stahta01 on October 27, 2023, 09:58:12 PM
Since they never really supported native CB Projects. Them dropping support for CB Custom makefile projects are not a major loss.

From my point of view, I agree with you.

The generated cbp(from CMakefiles) is just a makefile, and not a real CB native Project file.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

inversesquare.zip

Is there any plan to support CMake integration then?
I wanted to be called ziproot, but the filter flagged it as having the word "root" in it. Apparently people think someone named "ziproot" is the root user.

ollydbg

Quote from: inversesquare.zip on November 02, 2023, 06:33:30 PM
Is there any plan to support CMake integration then?

I don't use CMake in my own projects, so I don't have the motivation to improve this.

If you have the need, or other devs has the motivation, you/they can try to integrate it.

But I still don't know what does the "cmake-file-api" used for.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Grit Clef

Quote from: inversesquare.zip on November 02, 2023, 06:33:30 PM
Is there any plan to support CMake integration then?
But you can still partly use this functionality in CB, by installing someone's plugin.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

inversesquare.zip

I wanted to be called ziproot, but the filter flagged it as having the word "root" in it. Apparently people think someone named "ziproot" is the root user.

Grit Clef

https://wiki.codeblocks.org/index.php/Project_Exporter
This website introduces it simply. I remember the latest version can be downloaded from github, but now I can't find the right address...
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

christo

Quote from: Grit Clef on November 07, 2023, 01:23:36 PM
https://wiki.codeblocks.org/index.php/Project_Exporter
This website introduces it simply. I remember the latest version can be downloaded from github, but now I can't find the right address...
This plugin exports the project as CMake, but still plugin to import cmake is not available.
I've collected Project_Exporter source from github and added to https://github.com/josephch/CBProjectExporter . It looks good, needs a bit more polishing. Now  manual edits of generated CMakeLists.txt is required to make it work.

Wkerry

The repo is not forked and I cannot find where it came from as you said it came from github.

Can you point me at where you "llected Project_Exporter source from github" so I look at the original source.

Thanks.

Grit Clef

@christo
Thanks for your provision. You do need to modify the generated file, but that is more easier.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

christo

Quote from: Wkerry on November 09, 2023, 10:08:05 AM
The repo is not forked and I cannot find where it came from as you said it came from github.

Can you point me at where you "llected Project_Exporter source from github" so I look at the original source.

Thanks.

I got the information  about github project https://github.com/acotty/CodeBlocks_Unofficial_Testing/ from  https://forums.next.codeblocks.org/index.php/topic,25062.0/prev_next,next.html#new , but I could not access that repo. So I seached for forks of CodeBlocks_Unofficial_Testing and found https://github.com/stahta01/CodeBlocks_Unofficial_Testing . Copied the code from that repo https://github.com/stahta01/CodeBlocks_Unofficial_Testing/tree/master/src/plugins/contrib/ProjectExporter . Hope this helps.

Wkerry