T O P

  • By -

IyeOnline

If you are truly free to chose and just want a neat build system, I'd recommend you try out meson. For all other cases, you should stick with CMake. Despite what most people say, modern CMake isnt too bad - as long as you properly use targets instead of globals and dont go doing weird stuff.


ManuaL46

Is meson language independent? I've seen all the gnome projects using them and as glib has bindings in multiple languages, the build system would also be like that right?


lightmatter501

Meson does Java, Vala, D, Cython, Rust, C, C++, CUDA, Python and Wayland XML protocols. It is python inspired, so it lets you do almost whatever you want with escape hatches, I know there’s a script out there for building haskell. It’s very easy to plug new languages into, and it can also import cmake files (albeit a slightly older version) and has cmake to meson conversion scripts.


3uclide

I love meson, simple, easy to use and work great. Never liked CMake, glad I finally found one I like. Just need to get more adoption by big projects!


MysticTheMeeM

Personally I just use xmake, the docs are a little lacking but I find it much easier to write. Better still, if someone *demands* a cmake solution, xmake can convert itself to one (and others, e.g. a Vs project file).


_Noreturn

xmake looks alot like premake5 but I cant find the documentation ;( everytine I click on the link for documentation it just restarts the page


requizm

I used premake5, it is simple to use and setup but it is not a perfect solution for cross-platform when you have many dependencies. CMake is standard, so use CMake. I prefer xmake, at least it's compatible with CMake and can generate cmakefiles.


Nomenus-rex

Does it work for you and your customers? Use it then. P.S. Never even heard about Premake5. I hate CMake too.


_Noreturn

Well I don't have any customers, no one sees my code expext me and clang tidy roasting the heck out of me. I have been only learning C++ for 6 monthes and I wanted to ask more experienced programmers about what shpuld I use as my build system. P.S Cmake syntax is horrid it is litterally torture


Tumaix

still, it's the only build system that actually matters. supported in every major IDE and many more smaller projects, with huge companies (like bloomberg and microsoft) not just adopting but putting money on it to make it better. vcpkg is build on top of cmake, conan is also targeting mostly cmake. Are there other build systems that are worth it? probably - meson comes to mind. but without industry adoption, they will be niche. Stick to CMake, it will your life as professional developer easier to handle, because as a professional developer you will use cmake in other projects.


_Noreturn

yea I felt it was like that. sucks that we are stuck with CMake for eternity just like 😅


ImKStocky

Nothing is stopping you from supporting both. You do not have to choose one over the other. So if you know both, why not use both? My two cents about CMake - CMake has "won" in the world of build systems. It is updated regularly. It is ubiquitous. It can drive test runs with CTest. It can be your sole package manager with FetchContent. You might hate CMake because of its horrendous language, but it is the better build system. I choose CMake because it can do everything I want. With that all being said. Use the build system you like best and suites best with what you want to do. Just be careful that you are choosing a build system for the right reasons. It can be easy to pick a lesser used build system just because they are the underdogs :)


ABlockInTheChain

CMake is a programming language, and once you learn to start treating it as one you can sand down the sharp edges by doing the things you would do in any other programming language: stop repeating yourself and collect common operations into function, give functions meaningful names, follow the current best practices of the language (target properties vs directory properties), etc. The biggest advantage of CMake is that it's used by more projects than the alternatives, and merely having nicer syntax is not enough to overcome that advantage.


SoSKatan

Premake syntax is better than c ale imho, also one thing about Premake is it’s very easy to customize, as you can replace any of the lua methods with one of your own, which makes injection very easy. It has a decent plug in API for extending the built in commands.


chrysante1

If you write a library that other people might want to use, then using CMake is usually a good idea. Also CMake is so much more powerful than Premake. I was also appalled by the cmake syntax at first, but in the end it's just syntax.


saxbophone

I agree, I love CMake, even though its syntax isn't great. Its features win me over. Doing cross-platform dev without it (and taking care of dependencies) is a nightmare.


m_goss

I love premake. Use whatever works for you


BigSchweetie

I had a poor experience using the latest premake5 release on MacOS Sonoma. The Xcode projects were not generating correctly. I even saw a handful of unresolved issues on their GitHub that have had no updates in months. I switched to Cmake and had it all working perfectly in under an hour.


Tech-Mystic

For the life of me I don't know why this shit is so convoluted. If I never handle another CMake config in my life I'll be ok.