3 ms·
What alternatives are there to Make? Popular C/C++ alternative build systems are SCons, CMake, Bazel, and Ninja. IMHO just bite the bullet and start with CMake
by jimbob45 3y ago
What alternatives are there to Make? Popular C/C++ alternative build systems are SCons, CMake, Bazel, and Ninja.
IMHO just bite the bullet and start with CMake. Make is such a pain to learn and is instantly useless once you realize you're going to need CMake at some point in your career anyway.
- dventimi 3y agoI've used Make routinely in my 25 year career as a backend software engineer and data scientist working mostly in Java, C#, Fortran, Python, SQL, and on the command line. So far I've never experienced the need for CMake. Perhaps I just need a few more years under my belt.
- xboxnolifes 3y agoThe comment is explicitly targeted toward those working with C or C++.
- stabbles 3y agoThe issue is that Make isn't particularly well suited to figure out properties of C / C++ compilers, or how to locate and link dependencies. That's the main reason Autotools and CMake exist.
- cozzyd 3y agoyeah, CMake helps if not everyone is running the same compiler/environment as you. If your code only ever runs with gcc on Linux though, Make works pretty well..
- dventimi 3y agoThat's fair. I see now that the parent did in fact make reference to C/C++. I was reacting to the mistaken impression that the parent was making a blanket statement that went beyond C/C++.
- deleted 3y ago[deleted]
- dfox 3y agoIf you come from a unix background the Meson/Ninja combination (more or less autotools without legacy crud) is probably more approachable than CMake with all of its implicit magic.
- ho_schi 3y agoCame here to post the same. The answer for How to build software? is Meson[1] for C and C++ and also other languages. Works well on Windows and Mac, too. I’ve written a small Makefile to learn the basic and backgrounds. Make itself is fine. But the next higher level would have been Autotools. Which is an intimidating and weird set of tools. Most new stuff written in C/C++ use now Meson and it feels sane. [1] https://mesonbuild.com https://mesonbuild.com
- dima55 3y agoMake is a language for making build systems. CMake is a build system that uses Make written by people who haven't read the manual. Anybody touching build systems at all needs to do themselves a huge favor: read the GNU Make manual to be able to write a Makefile to support a small project. This isn't difficult, and gives you wonderful perspective about what build systems are great and which aren't. CMake is good if you need to support many different unixes and xcode and visual studio. If you don't, then cmake gives you lots of pain for no benefit. Make is simple and good-enough for most cases. I use this: https://github.com/dkogan/mrbuild https://github.com/dkogan/mrbuild But it's not special and there are lots like it. And they are all infinitely better than cmake
- blt 3y agoCMake is too complicated. You can tell it was made by C++ programmers. (I am one, btw.)