Choosing a Modern C++ stack
source link: https://carlosvin.github.io/langs/en/posts/choosing-modern-cpp-stack/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Choosing Build System (Meson)
I have used before Make, Maven, Scons, Gradle and Autotools, but I have some reasons to try find something else:
It is not easy to configure and maintain. There are several configuration files and several configuration steps.
GradleC feature is still incubating. Not very fast. You can check a similar example project at link:/posts/gradle-cpp/[Build C project with Gradle].
MakeI don’t love the syntax. Files tends to get messy as project grows.
SconsIt is just slower and not as easy to understand than Meson.
MavenIt is slow and you might end up "Javatizing" your C++ project structure.
I’ve listed just things I don’t like, those projects have other great features. |
CMake vs Meson
Although Meson is written in Python, it generates a Ninja build project. First time you configure the project you have to run Meson, but for building or testing you are actually running Ninja.
It has a big advantage over Meson, it is mature and widely used in many projects, which means there are many examples and it will fulfill your C++ project building needs.
MesonIt is a young project compared with CMake, but it is growing quite fast and it has been adopted in other big projects like Gnome, they have an initiative to port from Autotools to Meson.
Finally I’ve chosen Meson because syntax is really clear to me, when I read meson.build
file I can quickly understand what is happening during build process.
-
First time you configure the project
-
Each time you build it
-
Each time you run tests
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK