1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-24 00:48:53 +03:00
Files
Bartosz Golaszewski 7edfd6b774 build: don't make catch2 mandatory when C++ bindings and tests are enabled
If both C++ bindings and the test suite are allowed but catch2 is absent,
meson setup would fail the build with error(). Follow the same *_enabled
graceful handling pattern established for all other optional components:
compute cxx_tests_enabled based on whether catch2 is actually found,
emit a warning() instead of error() when it's missing, and gate the C++
tests subdir on the new flag.

Also: enter the catch2 discovery block based on tests_enabled (instead of
opt_tests.allowed()) so it only runs once the test-suite dependencies
(threads, libgpiosim) are confirmed present.

Add a "C++ tests" line to the Bindings summary section, visible only when
C++ bindings are enabled.

Closes: https://github.com/brgl/libgpiod/discussions/190
Fixes: 97bab4cc87 ("build: replace autotools with meson & ninja")
Link: https://patch.msgid.link/20260622-build-catch2-issue-v1-1-be95e28f310b@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-06-24 17:17:52 +02:00
..