summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2018-12-18 21:51:42 -0600
committerGitHub <noreply@github.com>2018-12-18 21:51:42 -0600
commitc1a99bf8ecb0536cf40c16cf16b84035f0b69ee0 (patch)
tree5eb56e2f1482b17100bd742e89c0c60bc7d24324
parentb091fcdb8e8bf9c96e33bcbee23571d28c512534 (diff)
downloadspack-c1a99bf8ecb0536cf40c16cf16b84035f0b69ee0.tar.gz
spack-c1a99bf8ecb0536cf40c16cf16b84035f0b69ee0.tar.bz2
spack-c1a99bf8ecb0536cf40c16cf16b84035f0b69ee0.tar.xz
spack-c1a99bf8ecb0536cf40c16cf16b84035f0b69ee0.zip
Add additional info to MesonPackage docs (#10133)
* Add additional info to MesonPackage docs * No Pygments lexer for Meson code, default to none
-rw-r--r--lib/spack/docs/build_systems/mesonpackage.rst44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/spack/docs/build_systems/mesonpackage.rst b/lib/spack/docs/build_systems/mesonpackage.rst
index 4b30ac5df0..6d68e99af6 100644
--- a/lib/spack/docs/build_systems/mesonpackage.rst
+++ b/lib/spack/docs/build_systems/mesonpackage.rst
@@ -54,6 +54,28 @@ Packages that use the Meson build system can be identified by the
presence of a ``meson.build`` file. This file declares things
like build instructions and dependencies.
+One thing to look for is the ``meson_version`` key that gets passed
+to the ``project`` function:
+
+.. code-block:: none
+ :emphasize-lines: 10
+
+ project('gtk+', 'c',
+ version: '3.94.0',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1',
+ # We only need c99, but glib needs GNU-specific features
+ # https://github.com/mesonbuild/meson/issues/2289
+ 'c_std=gnu99',
+ ],
+ meson_version: '>= 0.43.0',
+ license: 'LGPLv2.1+')
+
+
+This means that Meson 0.43.0 is the earliest release that will work.
+You should specify this in a ``depends_on`` statement.
+
^^^^^^^^^^^^^^^^^^^^^^^^^
Build system dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,6 +89,28 @@ the ``MesonPackage`` base class already contains:
depends_on('meson', type='build')
depends_on('ninja', type='build')
+
+If you need to specify a particular version requirement, you can
+override this in your package:
+
+.. code-block:: python
+
+ depends_on('meson@0.43.0:', type='build')
+ depends_on('ninja', type='build')
+
+
+^^^^^^^^^^^^^^^^^^^
+Finding meson flags
+^^^^^^^^^^^^^^^^^^^
+
+To get a list of valid flags that can be passed to ``meson``, run the
+following command in the directory that contains ``meson.build``:
+
+.. code-block:: console
+
+ $ meson setup --help
+
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
Passing arguments to meson
^^^^^^^^^^^^^^^^^^^^^^^^^^