You are not logged in.
Hello,
I've been reading about autotools and cmake, but the truth is I don't know which one is recommended these days.
Some stick with autotools, while others insist on using cmake.
What would be the best option these days to use for cross compilation (Linux, Windows,..)?
Thx
Failure is success in progress.
A.E.
Offline
I've used CMake almost exclusively for most of C++ I've written or maintained. On the other hand, I've almost never used autotools, so I am biased.
Here's what I can tell you:
The CMake syntax is weird and can be frustrating at times, but it has the best support for cross-compilation I know of.
Also, its supported by and can be used with many IDEs. Android Studio, Visual Studio and Qt Creator all work great with CMake.
CMake + ninja is much, much faster than autotools + make, (and it works really well on Windows too)
Shameless plug: I wrote about CMake many times on my blog:
Here's a whole series about using CMake for both desktop, Android and iOS
Finally, an advice: take the time to read about CMake build system first, and always assume any CMake code you read has been cargo-culting-copied from an other project (sad, but true).
Hope this helps!
Last edited by dmerej (2019-03-16 20:07:08)
Responsible Coder, Python Fan, Rust enthusiast
Offline
PS: If you need to compile or cross-compile dependencies, take a look at conan.
Not a perfect tool, but we use it at work and it has all the features we need.
Responsible Coder, Python Fan, Rust enthusiast
Offline
Thx for your answer dmerej :-)
I would mainly use it with Eclipse and use the gtkmm lib
Would it also be suitable for this?
Failure is success in progress.
A.E.
Offline
You can also try xmake. https://github.com/xmake-io/xmake
Offline