diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2020-04-16 10:46:39 -0700 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-04-17 18:14:27 +0300 |
| commit | 0e4d35968d8606f422ce31358a5d4d34870a2665 (patch) | |
| tree | 18cd30e8a21f96ee49c089b70398c5dedfb8f60f | |
| parent | d4449ed61310009c53259d7c19b85db093104787 (diff) | |
| download | meson-0e4d35968d8606f422ce31358a5d4d34870a2665.tar.gz | |
tests/common/93: Fix cross building when no exe_wrapper is available
By building the generator for the build machine always, and only for the
host machine if an exe_wrapper is available. This makes sense to me as
generally you are going to build the generator for the build machine,
not the host machine, but testing on the host machine makes sense too.
| -rw-r--r-- | test cases/common/93 selfbuilt custom/meson.build | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test cases/common/93 selfbuilt custom/meson.build b/test cases/common/93 selfbuilt custom/meson.build index fc5d916eb..3cc3906b6 100644 --- a/test cases/common/93 selfbuilt custom/meson.build +++ b/test cases/common/93 selfbuilt custom/meson.build @@ -17,7 +17,7 @@ test('maintest', main) lib = library('libtool', 'tool.cpp') -checkarg = executable('checkarg', 'checkarg.cpp') +checkarg = executable('checkarg', 'checkarg.cpp', native : true) ctlib = custom_target('ctlib', output : 'ctlib.out', @@ -25,3 +25,15 @@ ctlib = custom_target('ctlib', command : [checkarg, lib], build_by_default : true, ) + +if meson.is_cross_build() and meson.has_exe_wrapper() + checkarg_host = executable('checkarg_host', 'checkarg.cpp') + + ctlib_host = custom_target( + 'ctlib_host', + output : 'ctlib.host.out', + capture : true, + command : [checkarg_host, lib], + build_by_default : true, + ) +endif |
