You are not logged in.

#1 2019-03-16 07:51:52

chrisdb
Member
Registered: 2018-05-16
Posts: 103

Autoconf or cmake cross compilation

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

Offline

#2 2019-03-16 20:03:57

dmerej
Member
From: Paris
Registered: 2016-04-09
Posts: 82
Website

Re: Autoconf or cmake cross compilation

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:

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, Scrum Master, Buildfarm Guru, Python3 Fan
twitter: @d_merej mastodon:@dmerej@mamot.fr

Offline

#3 2019-03-16 20:05:57

dmerej
Member
From: Paris
Registered: 2016-04-09
Posts: 82
Website

Re: Autoconf or cmake cross compilation

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, Scrum Master, Buildfarm Guru, Python3 Fan
twitter: @d_merej mastodon:@dmerej@mamot.fr

Offline

#4 2019-03-18 20:01:58

chrisdb
Member
Registered: 2018-05-16
Posts: 103

Re: Autoconf or cmake cross compilation

Thx for your answer dmerej :-)
I would mainly use it with Eclipse and use the gtkmm lib

Would it also be suitable for this?

Offline

#5 2019-06-12 05:04:58

waruqi
Member
Registered: 2017-03-13
Posts: 8

Re: Autoconf or cmake cross compilation

You can also try xmake. https://github.com/xmake-io/xmake

Offline

Board footer

Powered by FluxBB