Re: [RFC PATCH v4 00/19] Modernize the build system
- From
Eli Schwartz <eschwartz@gentoo.org>
- Date
- Nov 12, 2024, 02:36 UTC
- Message-ID
- <941bae7b-83be-43f8-aaa3-43b4d9501690@gentoo.org>
- In-Reply-To
- <20241112022104.GA77521@coredump.intra.peff.net>
On 11/11/24 9:21 PM, Jeff King wrote:
Show 6 quoted lines
> Yes, that does get "meson setup" to complete for me. That gives me two > other questions: > > - how would I know this option exists? I think you mentioned elsewhere > in the thread the ability to ask about which options exist, but I > couldn't find anything via "meson -h", etc.
meson -h lists:
configure Change project options
Which could perhaps be reworded as it allows you to both view and change them.
If you install meson via a linux distribution package, it probably has nice integration with our manpage. If you install it with `pip install meson` then not so much...
$ man meson
The configure command
meson configure provides a way to configure a Meson project from
the command line. Its usage is simple:meson configure [ build directory ] [ options to set ]
If build directory is omitted, the current directory is used
instead. If no parameters are set, meson configure will print the value of
all build options to the console.To set values, use the -D command line argument like this.
meson configure -Dopt1=value1 -Dopt2=value2
> - is there a way to put configuration like this in a file, similar to > our current config.mak?
https://mesonbuild.com/Machine-files.html
machine files (passed via --cross-file or --native-file) allow you to define your toolchain, e.g. set up persistent CFLAGS and CC that you can store as a configuration file, check into git, share with people, etc.
You can also store configuration options in them:
[project options] gettext = 'disabled' default_editor = 'vim'
[built-in options] c_std = 'gnu17' b_lto = true b_sanitize = 'address,undefined'
-- Eli Schwartz