Commit e7b0d89a authored by Adam Duskett's avatar Adam Duskett Committed by Philip Withnall

Only build tests if certain conditions are met.

Currently, there is no way to prevent tests from building using meson.
When cross-compiling, building the tests isn't necessary.

Instead, only build the tests on the following conditions:
1) If not cross-compiling.
2) If cross-compiling, and there is an exe wrapper.
parent 422e5fb1
......@@ -994,4 +994,8 @@ if enable_systemtap
endif
subdir('fam')
subdir('tests')
# Don’t build the tests unless we can run them (either natively or in an exe wrapper)
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
\ No newline at end of file
......@@ -459,4 +459,8 @@ if enable_systemtap
install : true)
endif
subdir('tests')
# Don’t build the tests unless we can run them (either natively or in an exe wrapper)
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
\ No newline at end of file
......@@ -166,4 +166,8 @@ if enable_systemtap
install : true)
endif
subdir('tests')
# Don’t build the tests unless we can run them (either natively or in an exe wrapper)
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
\ No newline at end of file
......@@ -2045,7 +2045,11 @@ subdir('gthread')
subdir('gmodule')
subdir('gio')
subdir('fuzzing')
subdir('tests')
# Don’t build the tests unless we can run them (either natively or in an exe wrapper)
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
# xgettext is optional (on Windows for instance)
if find_program('xgettext', required : get_option('nls')).found()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment