Catch2 and meson
When specifying main
manually, this will suffice:
1test_deps = _deps + dependency('Catch2')
Which will pick up the pkgconfig
configuration typically. However, to use the
main
which comes with catch2
it is easier to use cmake
:
1test_deps += dependency(
2 'Catch2',
3 method: 'cmake',
4 modules: ['Catch2::Catch2WithMain'],
5)
The rest of the tests can be setup via auto-discovery as discussed before.
Comments