3 ms·
Autotools are a mess from a developer point of view, but are the easier system to use for the user. Building an autotools project is simple, doesn't require dep
by alerighi 4y ago
Autotools are a mess from a developer point of view, but are the easier system to use for the user. Building an autotools project is simple, doesn't require dependencies since the output is the configure script that is a shell script.
./configure --prefix /usr/local
make -j$(nproc)
sudo make install
I learned these commands when I was 12 years old, at that time building a CMake project always seamed an impossible task to me, they are all different and not standard.
Anyway at work I use CMake for the fact that I don't publish my software openly thus it doesn't really matter.
- patrick451 4y agoYeah, I think it's underappreciated by developers how nice autotools makes the end user experience. Before I was a developer, I had the same experience trying to build cmake project. They just never seemed to work right.
- prewett 4y agoIf it works, autotools is fine. I've had to wade through a bunch of autotooled projects for which it didn't work. Those scripts are no fun to debug.
- palata 4y agoI agree that Autotools is fine, but the CMake equivalent of your snippet is not that far with CMake: cmake --CMAKE_INSTALL_PREFIX=/usr/local -Bbuild -S. cmake --build build --target install --parallel $(nproc)
- xeeeeeeeeeeenu 4y agoYou also need "-DCMAKE_BUILD_TYPE=Release" (or some other value). Otherwise, it will use a toolchain-specific default, which often means "no optimizations and no debug symbols".
- rleigh 4y agoThe Autotools do have dependencies: they require a functional Unix platform to run, including a shell and a fair number of common command-line tools. This is the number one reason people use CMake. It's a single binary that runs on every platform with no external dependencies, notably including Microsoft Windows. This makes it much more portable. CMake is itself a shell.