mirror of
https://github.com/nlohmann/json.git
synced 2026-10-04 05:30:31 +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:
@@ -0,0 +1,21 @@
|
||||
# check_build_options
|
||||
|
||||
Checks that the Meson build and the pkg-config files offer the same options as the CMake target, so that a new CMake
|
||||
option is not forgotten in one of them.
|
||||
|
||||
The compile definitions of the CMake target (`target_compile_definitions` in [`CMakeLists.txt`](../../CMakeLists.txt))
|
||||
are the reference. When you add an option there, also add it to
|
||||
|
||||
- the pkg-config block in `CMakeLists.txt` (`NLOHMANN_JSON_PKGCONFIG_CFLAGS`),
|
||||
- [`meson_options.txt`](../../meson_options.txt), named without the `JSON_` prefix and with the same default,
|
||||
- [`meson.build`](../../meson.build) (`json_defines`), and
|
||||
- the list of Meson options in
|
||||
[`docs/mkdocs/docs/integration/package_managers.md`](../../docs/mkdocs/docs/integration/package_managers.md).
|
||||
|
||||
Run the check with
|
||||
|
||||
```shell
|
||||
make check_build_options
|
||||
```
|
||||
|
||||
It needs only Python 3 and runs in the `ci_meson_install` CI job.
|
||||
Reference in New Issue
Block a user