meson.build: Fix add_lamguages() warning

We need to set the `native` flag:

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

As documented [1]:

    If set to true, the language will be used to compile for the build
    machine, if false, for the host machine.

[1] https://mesonbuild.com/Reference-manual_functions.html#add_languages
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2023-09-02 17:58:07 +02:00
parent 74829a650d
commit 63732a5431

View file

@ -701,7 +701,7 @@ executable('test-build-linker',
dependencies : [ dep_libinput, dep_libinput_util ],
install : false)
# test including from C++ (in case CPP compiler is available)
if add_languages('cpp', required: false)
if add_languages('cpp', native: false, required: false)
executable('test-build-cxx',
'test/build-cxx.cc',
dependencies : [dep_udev],