diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/240 dependency native host == build | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/240 dependency native host == build')
-rw-r--r-- | meson/test cases/common/240 dependency native host == build/meson.build | 18 | ||||
-rw-r--r-- | meson/test cases/common/240 dependency native host == build/test.json | 14 |
2 files changed, 32 insertions, 0 deletions
diff --git a/meson/test cases/common/240 dependency native host == build/meson.build b/meson/test cases/common/240 dependency native host == build/meson.build new file mode 100644 index 000000000..bdcd93cef --- /dev/null +++ b/meson/test cases/common/240 dependency native host == build/meson.build @@ -0,0 +1,18 @@ +project('foo', 'c') + +if meson.is_cross_build() + error('MESON_SKIP_TEST Test does not make sense for cross builds') +endif + +dep_zlib = dependency('zlib', required : false) +if not dep_zlib.found() + error('MESON_SKIP_TEST Test requires zlib') +endif +dependency('zlib', native : true, required : false) +dependency('zlib', native : false) + +# `native: true` should not make a difference when doing a native build. +meson.override_dependency('expat', declare_dependency()) +dependency('expat') +dependency('expat', native : true) +dependency('expat', native : false) diff --git a/meson/test cases/common/240 dependency native host == build/test.json b/meson/test cases/common/240 dependency native host == build/test.json new file mode 100644 index 000000000..5e2a715e3 --- /dev/null +++ b/meson/test cases/common/240 dependency native host == build/test.json @@ -0,0 +1,14 @@ +{ + "stdout": [ + { + "line": "Dependency zlib found: YES .* \\(cached\\)", + "match": "re", + "count": 2 + }, + { + "line": "Dependency expat found: YES .* \\(overridden\\)", + "match": "re", + "count": 3 + } + ] +} |