News:

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

Main Menu

C::B Workspace/project to cmake or premake?

Started by cacb, November 14, 2020, 10:20:05 AM

Previous topic - Next topic

cacb

#15
Quote from: sodev on February 08, 2024, 08:05:00 PM
CMake is the future! Finally the C++ world is getting some sort of standard build system that does not only drive automated builds but can also be used by any IDE. Finally you don't have to maintain multiple build systems to make your CI and users happy.

However, this requires that your favorite IDE does support CMake, which CodeBlocks currently doesn't, and it doesn't look like it will in the near future.
I have had the mixed pleasure of using CMake integrated into VScode for C++ development. What I said earlier in this thread still stands. Using CMake hasn't convinced me it is the future, on the contrary.

By the way I did write a C::B to premake plugin to test out the idea
https://gitlab.com/arnholm/premake5cb

sodev

There is definately a learning curve using CMake, this out-of-tree approach feels pretty strange when you are used to the in-tree approach, but today i don't want to go back anymore. I was using CodeBlocks + Premake for around 10 years (in the beginning without Premake) but in the opposite direction like your plugin, Premake was my source and i generated CodeBlocks projects and Makefiles from it. CMake is still not there in the C++ world where Gradle is in the Java world, due to the nature of native code probably will never be, but i like the progress i see. Yes, i remember the past when i was annoyed about that CMakeLists.txt file in libraries i wanted to use and looked for alternatives, now im annoyed when that file is not there :).

About other IDEs with CMake integration, there is an overview here, the only one i am really using is VSCode. Yes, there is also a learning curve, especially if you are used to classic desktop applications, maybe its easier for "digital natives" who have never seen anything else than web-stuff :P. But once you found the proper extensions and made the right settings, its a pretty awesome IDE :).

Wkerry

If you want to use CMAKE seach the forum for CMAKE plugins and ask why has it not progressed as I have no idea what happened to the dev who was working on it last.

user2024

Quote from: cacb on February 08, 2024, 09:48:49 PM

By the way I did write a C::B to premake plugin to test out the idea

And what about the opposite direction, premake to C::B?

cacb

Quote from: user2024 on February 09, 2024, 01:25:57 PM
Quote from: cacb on February 08, 2024, 09:48:49 PM

By the way I did write a C::B to premake plugin to test out the idea

And what about the opposite direction, premake to C::B?
They do exist, I have one installed under Kubuntu 22.04
https://github.com/chris-be/premake-codeblocks

These days I just use Code::Blocks.

cacb

Slightly off topic comment: On the principles of build systems, I like the ideas put forward in this video

Better Way to Build C
https://www.youtube.com/watch?v=mLUhSPD4F2k

It is not a fully developed idea and if I did it I would use simple C++. But one important argument is why use an 'incomprehensible' script like CMake when you already have a much more powerful and familiar language like C++ when you are developing a C++ application?. The whole build system could be simple C++ source code which is easily bootstrapped and used for building an application.  It even knows which compiler used for bootstrapping it and will be used for building the application. Something like that seems appealing even as an incomplete idea.

user2024

Quote from: cacb on February 10, 2024, 11:02:46 AM

They do exist, I have one installed under Kubuntu 22.04
https://github.com/chris-be/premake-codeblocks

These days I just use Code::Blocks.
And can this thing turn this cmakelist.txt into a Code::Blocks? Does it only work on Linux and only with this clang?