diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d44a3f1d..eff69e38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -369,8 +369,10 @@ jobs: -Dtest_num_events=${{ env.num_events }} \ -Dtest_output_dir=$(pwd)/validation_results \ ${{ matrix.opts }} - - name: dump build options + - name: dump all build options run: meson configure iguana_build --no-pager + - name: dump project build options + run: iguana_src/meson/dump-build-options.sh iguana_build - run: meson compile working-directory: iguana_build - run: meson install diff --git a/doc/setup.md b/doc/setup.md index 4b186775..78edc7b9 100644 --- a/doc/setup.md +++ b/doc/setup.md @@ -118,8 +118,10 @@ meson configure # outputs in a pager (`less`); you may scroll, or p meson configure --no-pager # do not use a pager ``` **but that's a _lot_ of text!** The _most important_ build options are near the bottom, under **"Project options"**. - -Alternatively, see [`meson.options`](/meson.options) for the list of project options, and some more details. +To see _just_ the project options, run the following (which requires [`jq`](https://jqlang.github.io/jq/)): +``` +/path/to/iguana-source/meson/dump-build-options.sh . +``` To set any build option, _e.g._ `install_examples` to `true`, run: ```bash diff --git a/meson/dump-build-options.sh b/meson/dump-build-options.sh new file mode 100755 index 00000000..4251fd58 --- /dev/null +++ b/meson/dump-build-options.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +if [ $# -ne 1 ]; then + echo "USAGE: $0 [BUILD_DIRECTORY]" >&2 + exit 1 +fi +builddir=$1 +meson introspect --buildoptions $builddir | jq -r 'map(select(.section=="user") | del(.section,.machine))'