Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): dump the project options #265

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions doc/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions meson/dump-build-options.sh
Original file line number Diff line number Diff line change
@@ -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))'