diff options
author | Rudi Heitbaum <rudi@heitbaum.com> | 2023-06-13 20:02:01 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 11:02:01 +0100 |
commit | b58a0014bff619f1810af49441d987d732c4244e (patch) | |
tree | 68b6db7fcf910fc5b80dee192c1a1d55b63374c7 /meson.build | |
parent | 6d08472ea47db895748d5ca7d3daf032c3fefcf8 (diff) | |
download | libfuse-b58a0014bff619f1810af49441d987d732c4244e.tar.gz |
Wrapper around test applications for cross compiler environment in meson.build (#804)
This enhances commit 7be56c57f93e3436b1fbd9ecc320de5c03a3e4b8 to allow build
fuse to be built using a cross compiler
Fixes:
../meson.build:180:12: ERROR: Can not run test applications in this cross environment.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 7aa4e0d..9707ea3 100644 --- a/meson.build +++ b/meson.build @@ -177,10 +177,12 @@ int main() } ''' -result = cc.run(detect_getmntent_needs_unescape) -if result.compiled() and result.returncode() == 0 and result.stdout().strip() == 'needs escaping' - message('getmntent does not unescape') - add_project_arguments('-DGETMNTENT_NEEDS_UNESCAPING', language: 'c') +if not meson.is_cross_build() + result = cc.run(detect_getmntent_needs_unescape) + if result.compiled() and result.returncode() == 0 and result.stdout().strip() == 'needs escaping' + message('getmntent does not unescape') + add_project_arguments('-DGETMNTENT_NEEDS_UNESCAPING', language: 'c') + endif endif # Write private test results into fuse_config.h (stored in build directory) |