cmake-init
meson
cmake-init | meson | |
---|---|---|
165 | 112 | |
1,997 | 5,544 | |
- | 1.2% | |
7.5 | 9.8 | |
29 days ago | 6 days ago | |
CMake | Python | |
GNU General Public License v3.0 only | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cmake-init
- CMake-init – The missing CMake project initializer
-
CMake install schema for single- and multi-config generators
https://github.com/friendlyanon/cmake-init This is how you do CMake properly. If you deviate from its install rules you are highly likely to do something wrong.
-
cgen: another declarative CMake configuration generator
CMake itself is as declarative as a build systems need to be. For anything nontrivial, these "declarative" solutions all fall apart. Just use https://github.com/friendlyanon/cmake-init, learn CMake and you won't have any issues.
-
How does one actually build a C++ project
If you want something with a (mostly) Just Works experience then just use https://github.com/friendlyanon/cmake-init
- CMakeList.txt, add_executable vs. add_library vs. target_link_libraries vs. target_link_directories
- Check out my tasks.json for C++ of VScode
- Clang++ Halp
-
Putting libraries in program folder
For CMake basics check out the official "Getting started" tutorial: https://cmake.org/cmake/help/latest/guide/tutorial/index.html, as well as Introduction to Modern CMake. You can also get inspired by the CMake project generator cmake-init
- Recourses to help understand libraries/projects and setting them up?
-
How to Create a Modern C Project with CMake and Conan
You can just use https://github.com/friendlyanon/cmake-init to get a CMake + Conan C project ready to go with a short little command: cmake-init --c -e -p conan coolio
meson
-
cargo-c common questions
With cargo-c I try to use the best practices to support as many platform as possible, trying to stay in sync with what meson does. Sadly what is conceptually trivial, installing a package, has lots of details that are platform-specific.
- Ask HN: How to handle user file uploads?
-
Which Build Tool for a Bootstrappable Project?
[1]: https://github.com/mesonbuild/meson/issues/8153
- Building Waybar fails
-
How to find a list of all gcc errors/warnings?
As it happens, I recently landed a PR in meson to add a clang-like Weverything mode that includes all of that, so you can get a minimal list of more or less all GCC warnings, organized by version, from the meson source here: https://github.com/mesonbuild/meson/blob/710a753c78077220b13a9f7e999dcdb61339efb1/mesonbuild/compilers/mixins/gnu.py
-
Makefile Tutorial
Came here to post the same. The answer for How to build software? is Meson[1] for C and C++ and also other languages. Works well on Windows and Mac, too.
I’ve written a small Makefile to learn the basic and backgrounds. Make is fine. But the next high-level would have been Autotools, which is an intimidating and weird set of tools. Most new stuff written in C/C++ use now Meson and it feels sane.
[1] https://mesonbuild.com
-
CMake x make?
If you are very fortunate, you'll be able to choose something else. I like meson myself: it looks a bit like python, it's popular, small, simple, well-documented, easy to install and update, and it works well everywhere.
-
C++ Papercuts
I suggest changing the build tool. Meson improved C and C++ a lot:
https://mesonbuild.com/
The dependency declaration and auto-detection is nice. But the hidden extra is WrapDB, built-in package management (if wanted):
https://mesonbuild.com/Wrap-dependency-system-manual.html
-
A Modern C Development Environment
> C's only REAL problem (in my opinion) which is the lack of dependency management. Most everything else can be done with a makefile and a half decent editor.
Care to hear about our lord and saviour Meson?
Both of your quoted problems are mutually incompatible: dependency management isn't the job of the compiler, it's a job for the build or host system. If you want to keep writing makefiles, be prepared to write your own `wget` and `git` invocations to download subprojects.
Meanwhile, Meson solves the dependency management problem in a way that makes both developers and system integrators/distributions happy. It forces you to make a project that doesn't have broken inter-file or header dependency chains and cleans up all the clutter and cruft of a makefile written for any non-trivial project, while making it trivial to integrate other meson projects into your build, let other people integrate your project into theirs, and provides all of the toggles and environment variables distribution developers need to package your library properly. You can really have your cake and eat it too.
https://mesonbuild.com/
-
cgen: another declarative CMake configuration generator
Other people going down this route seem to end up writing cmake replacements instead. I'm thinking of something like meson here except that meson never intended to transpile to cmake.
What are some alternatives?
w64devkit - Portable C and C++ Development Kit for x64 (and x86) Windows
CMake - Mirror of CMake upstream repository
xmake - 🔥 A cross-platform build utility based on Lua
ninja - a small build system with a focus on speed
fastbuild - High performance build system for Windows, OSX and Linux. Supporting caching, network distribution and more.
SCons
ModernCppStarter - 🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Bazel - a fast, scalable, multi-language and extensible build system
llvm-mingw - An LLVM/Clang/LLD based mingw-w64 toolchain
BitBake - The official bitbake Git is at https://git.openembedded.org/bitbake/. Do not open issues or file pull requests here.
dockcross - Cross compiling toolchains in Docker images
conan - Conan - The open-source C and C++ package manager