meson/docs/markdown/snippets
Dylan Baker 4a014d1724 Add support for meson.options as a replacement for meson_options.txt
We will still try to load `meson_options.txt` if `meson.options` doesn't
exist. Because there are some advantages to using `meson.options` even
with older versions of meson (such as better text editor handling)
we will not warn about the existence of a `meson.options` file if a
`meson_options.txt` file or symlink also exists.

The name `meson.options` was picked instead of alternative proposals,
such as `meson_options.build` for a couple of reasons:

  1. meson.options is shorter
  2. While the syntax is the same, only the `option()` function may be
     called in meson.options, while, it may not be called in meson.build
  3. While the two files share a syntax and elementary types (strings,
     arrays, etc), they have different purposes: `meson.build` declares
     build targets, `meson.options` declares options. This is similar to
     the difference between C's `.c` and `.h` extensions.

As an implementation detail `Interpreter.option_file` has been removed,
as it is used exactly once, in the `project()` call to read the options,
and we can just calculate it there and not store it.

Fixes: #11176
2023-03-28 15:01:10 +03:00
..
add_release_note_snippets_here Tell contributors not to write things in the snippet help file. [skip ci] 2020-01-27 23:11:44 +02:00
clang_cl_c++20.md clang-cl: supports /std:c++20 now. 2023-01-04 09:47:13 -08:00
coercing_option_values_deprecated.md Deprecate passing strings to non-string options 2023-01-20 00:18:42 -05:00
dep_objects.md document declare_dependency(object: ...) 2023-01-04 09:44:32 -08:00
devenv.md doc: Fix typo in release notes 2023-01-18 11:31:28 -05:00
feature_enable_auto_if.md interpreter: add a feature.enable_auto_if 2023-02-15 22:58:50 -05:00
feature_if_methods.md interpreter: add FeatureOption.enable_if and .disable_if 2023-02-15 22:58:50 -05:00
gen_objects.md allow passing generated objects in the "objects" keyword argument 2023-01-04 09:44:32 -08:00
license_files_project_info.md add license_files kwarg to project 2022-12-27 20:29:46 -05:00
licensesdir_option.md add builtin option to install licenses 2022-12-27 20:29:46 -05:00
meson_install_drop_privs.md minstall: drop privileges before running rebuild_all 2023-02-20 22:33:46 -05:00
meson_install_elevate.md minstall: rework root elevation prompt for extensibility and behavior 2023-02-20 20:29:31 -05:00
meson_options.md Add support for meson.options as a replacement for meson_options.txt 2023-03-28 15:01:10 +03:00
mintro_outputs.md mintro: redirect stdout to stderr 2023-03-02 10:10:03 -05:00
none-backend.md backends: add a new "none" backend 2023-03-20 17:22:50 -04:00
preprocess.md preprocess: Add dependencies kwarg 2023-02-15 15:12:34 -05:00
pybind11_dep.md dependencies: add pybind11 custom factory 2023-03-09 15:13:46 -05:00
reconfigure.md Allow --reconfigure and --wipe of empty builddir 2023-03-27 17:50:48 -04:00
run_script_dry_run.md allow install script to run in dry-run mode 2023-02-14 10:50:10 -05:00