mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 13:10:33 +00:00
Check in CI that Meson and pkg-config offer the CMake options
tools/check_build_options/check_build_options.py takes the compile definitions of the CMake target as the reference and checks that the CMake pkg-config block, meson_options.txt (name and default), meson.build, and the Meson section of the package manager docs have each option with the same definition and condition. It runs as make check_build_options in the ci_meson_install job, so a new CMake option cannot be forgotten in the Meson build again. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -267,7 +267,9 @@ ninja -C builddir
|
||||
```
|
||||
|
||||
`meson_options.txt` defines the options, which mirror the CMake options that change the library's target (for example,
|
||||
`-DDiagnostics=true`). Meson requires this file next to `meson.build`, so it is also part of `include.zip`.
|
||||
`-DDiagnostics=true`). Meson requires this file next to `meson.build`, so it is also part of `include.zip`. `make check_build_options`
|
||||
([`tools/check_build_options`](tools/check_build_options/README.md)) checks in CI that both files and the pkg-config files
|
||||
stay in sync with the CMake options.
|
||||
|
||||
When installing, `meson.build` installs the headers, a pkg-config file, and the CMake package config files, so that
|
||||
`find_package(nlohmann_json)` works. As Meson cannot generate `nlohmann_jsonTargets.cmake` itself, it is created from
|
||||
|
||||
Reference in New Issue
Block a user