meson: use gtest protocol for gtest based tests when possible
With the `gtest` protocol meson will add some extra arguments to the test to generate better junit results, which may be useful. This protocol is only available in meson 0.55.0+, so keep using the default `exitcode` protocol for meson older than that. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8484>
This commit is contained in:
@@ -30,6 +30,13 @@ project(
|
||||
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++14']
|
||||
)
|
||||
|
||||
# For meson >= 0.55.0, meson can inject some extra arguments to get richer
|
||||
# results from gtest based tests.
|
||||
gtest_test_protocol = 'exitcode'
|
||||
if meson.version().version_compare('>= 0.55.0')
|
||||
gtest_test_protocol = 'gtest'
|
||||
endif
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
|
Reference in New Issue
Block a user