Re:Meson 1.0 Build System
by hackerbrother on Friday December 23, 2022 @04:43PM
(#34110927)
Why do many C/C++ projects have both Meson and Ninja commands in their install instructions? Shouldn't only one be necessary?
[ Parent
| on HN ]
Meson looks at the system (finds compilers and dependencies, mostly) and prepares a build directory with a build.ninja file in it (and possibly other files).
Once the build directory is ready you compile with ninja, there is a wrapper "meson compile" but it's kinda pointless because it's longer and doesn't provide any extra functionality.
Meson generates Ninja files. At first, you were supposed to run ninja after Meson yourself but modern Meson support meson compile which calls ninja under the hood
Re:Meson 1.0 Build System
by hackerbrother on Friday December 23, 2022 @04:51PM
(#34110997)
Yup, and Wikipedia says it very clearly too. Thanks!
> In contrast to Make, Ninja lacks features such as string manipulation, as Ninja build files are not meant to be written by hand. Instead, a "build generator" should be used to generate Ninja build files. Gyp, CMake, Meson, and gn[9] are popular build management software tools which support creating build files for Ninja.
Re:Meson 1.0 Build System
by germandiago on Saturday December 24, 2022 @04:14AM
(#34115248)
meson compile will invoke the backend used.