5 ms·
> What platforms do we need to get rid of to get rid of autoconf/automake/configure and use e.g. CMake instead? Why would you want that? Autotools is the devil
by stefantalpalaru 11y ago
> What platforms do we need to get rid of to get rid of autoconf/automake/configure and use e.g. CMake instead?
Why would you want that? Autotools is the devil we know. CMake has its own problems and from a statistical sample of one project implementing both, I came to the conclusion that CMake is more frustrating than Autotools when you need to do something unusual.
- tanderson92 11y agoExactly. autotools is exceptionally well designed for dealing with more exotic use cases like cross compiling. When designing a cross-compiling linux distribution(http://exherbo.org/docs/multiarch.txt http://exherbo.org/docs/multiarch.txt) we discovered that autotools is by far the easiest to deal with when it comes to arbitrary host & build targets, compilers, etc. I would be even bolder and say that: Those who do not understand autotools are doomed to reinvent it, poorly.
- danieldk 11y agoExactly. autotools is exceptionally well designed for dealing with more exotic use cases like cross compiling. ...and it cannot deal with non-exotic use cases like non-UNIX environments (think Windows + Visual Studio) well at all. In contrast, with CMake you can generate an nmake file or Visual Studio project with one command.
- JoshTriplett 11y agoOn the other hand, with autotools you can cross-compile for Windows using MinGW.
- Sanddancer 11y agoJust like someone under unix could always just use mono's xbuild to build a project using visual studio's .vsproj files. Course, people tend to get grumpy when you tell them that they have to jump through hoops to use your project, just like your suggestion...
- nitrogen 11y agoI use CMake to cross-compile firmware for my home automation hardware. It doesn't seem too bad, just a single file shared across all projects that defines the compiler binaries and settings. I like it much better than autotools.
- detaro 11y agoDo you have an example online somewhere? This might be useful to have as a reference in the future.
- bodyfour 11y agohttp://www.vtk.org/Wiki/CMake_Cross_Compiling http://www.vtk.org/Wiki/CMake_Cross_Compiling
- deleted 11y ago[deleted]
- tanderson92 11y agoNote that autotools handles all that (referencing also your link in another child comment) for you with no extra work. Writing a autoconf script for a native architecture means your project should compile for a cross arch. It is for that reason I much prefer autotools, especially at the distribution level where you really don't want to be patching things. CMake can work, but I have had to do more patching for CMake build systems than I have had to for autotools; on that basis I consider autotools "better", at least for our use case.
- danieldk 11y agoI came to the conclusion that CMake is more frustrating than Autotools when you need to do something unusual. Unusual in terms of...? If I have learnt anything from Go, Java (per Maven), etc. it's that the far majority of project don't need to do something unusual. Conversely, if you give people the room to do unusual things, they will.
- astrodust 11y agoCMake. Ugh. It solves some problems and creates many, many more in the process. There's a certain simplicity from the perspective of the user that configure && make && make install works most of the time. CMake requires a lot of effort to get running by comparison.