build: only require C/C++ compilers for host

We use the no-op executables in test() directives, so these will be
run on the host. This fixes the following warning:

    tests/meson.build:23: WARNING: add_languages is missing native:, assuming
    languages are wanted for both host and build.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2021-04-15 10:02:48 +02:00
parent 9bc93d3ad2
commit e9a88a2e6c

View file

@ -20,7 +20,7 @@ endforeach
# Check buildability
add_languages('c', 'cpp')
add_languages('c', 'cpp', native: true)
replace = find_program('replace.py')
foreach protocol_file : protocol_files
@ -109,6 +109,7 @@ foreach protocol_file : protocol_files
'-Wall',
'-Werror' ],
install: false,
native: true,
)
test(test_name, pedantic_test_executable)
@ -136,6 +137,7 @@ foreach protocol_file : protocol_files
'-Werror',
],
install: false,
native: true,
)
test(test_name, cxx_test_executable)
endif