Author Topic: CMake Code::Blocks Generator Deprecation  (Read 8705 times)

Offline inversesquare.zip

  • Single posting newcomer
  • *
  • Posts: 4
  • AKA ziproot
CMake Code::Blocks Generator Deprecation
« on: September 25, 2023, 01:05:59 am »
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:
[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.

Offline HunterZ

  • Single posting newcomer
  • *
  • Posts: 1
Re: CMake Code::Blocks Generator Deprecation
« Reply #1 on: October 27, 2023, 08:39:33 pm »
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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7606
    • My Best Post
Re: CMake Code::Blocks Generator Deprecation
« Reply #2 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CMake Code::Blocks Generator Deprecation
« Reply #3 on: October 28, 2023, 12:27:17 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.

Offline inversesquare.zip

  • Single posting newcomer
  • *
  • Posts: 4
  • AKA ziproot
Re: CMake Code::Blocks Generator Deprecation
« Reply #4 on: November 02, 2023, 06:33:30 pm »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CMake Code::Blocks Generator Deprecation
« Reply #5 on: November 04, 2023, 02:13:00 am »
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.

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 66
  • Where there is a will, there is a way.
Re: CMake Code::Blocks Generator Deprecation
« Reply #6 on: November 04, 2023, 04:01:20 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 r13518, gcc 13.2.0, debug version

Offline inversesquare.zip

  • Single posting newcomer
  • *
  • Posts: 4
  • AKA ziproot
Re: CMake Code::Blocks Generator Deprecation
« Reply #7 on: November 05, 2023, 10:12:19 pm »
Whose plugin?
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.

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 66
  • Where there is a will, there is a way.
Re: CMake Code::Blocks Generator Deprecation
« Reply #8 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...
-Windows 7, 32-bit
-CodeBlocks r13518, gcc 13.2.0, debug version

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: CMake Code::Blocks Generator Deprecation
« Reply #9 on: November 08, 2023, 06:21:58 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.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: CMake Code::Blocks Generator Deprecation
« Reply #10 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.

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 66
  • Where there is a will, there is a way.
Re: CMake Code::Blocks Generator Deprecation
« Reply #11 on: November 09, 2023, 11:36:13 am »
@christo
Thanks for your provision. You do need to modify the generated file, but that is more easier.
-Windows 7, 32-bit
-CodeBlocks r13518, gcc 13.2.0, debug version

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: CMake Code::Blocks Generator Deprecation
« Reply #12 on: November 09, 2023, 05:10:28 pm »
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.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.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: CMake Code::Blocks Generator Deprecation
« Reply #13 on: November 10, 2023, 08:54:04 am »
Thanks.