You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sagemathgh-40485: meson: explicitly configurable options
As discussed in various places over the past two years, it is useful to
be able to override the automagic detection of libraries to explicitly
enable or disable a feature. This commit adds `meson.options` at the top
level to do that, and to make the documentation optional as well.
Example:
```
$ meson setup -Dsirocco=disabled
```
will disable the cython module `sage.libs.sirocco`, even if I have
sirocco installed. This is nice for a few reasons:
* If you are building from source (or using a source-based distro), this
is the only way to achieve accurate dependency information.
* Now that we are adding meson subprojects, there is again a risk of
vendoring libraries that you already have installed if (say) its pkg-
config check is flaky. Specifying `-Dfoo=enabled` makes that an error
rather than quietly doing the wrong thing.
* It makes it possible to easily test the `# needs whatever` tags on
non-Windows systems (i.e. to test that the things we say are optional
are really optional).
* On a system where the corresponding libraries happen to be installed,
you can speed up the build by disabling the features you aren't
currently working on or using.
And of course, the defaults are all "auto," and should not change
anything for anyone else.
I was finally motivated to do this because the doc build fails on my
machine, and otherwise I have to edit out the line in `src/meson.build`
and be careful not to commit it to all of my PRs. This implementation is
the first thing I came up with after a few minutes of reading the docs,
but it works surprisingly well.
URL: sagemath#40485
Reported by: Michael Orlitzky
Reviewer(s): Antonio Rojas, Dima Pasechnik, Michael Orlitzky, Tobias Diez
0 commit comments