aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/unit/51 noncross options
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/unit/51 noncross options')
-rw-r--r--meson/test cases/unit/51 noncross options/meson.build14
-rw-r--r--meson/test cases/unit/51 noncross options/prog.c1
-rw-r--r--meson/test cases/unit/51 noncross options/ylib.pc13
3 files changed, 28 insertions, 0 deletions
diff --git a/meson/test cases/unit/51 noncross options/meson.build b/meson/test cases/unit/51 noncross options/meson.build
new file mode 100644
index 000000000..42e2cbb55
--- /dev/null
+++ b/meson/test cases/unit/51 noncross options/meson.build
@@ -0,0 +1,14 @@
+project('std_remains', 'c', default_options: ['c_std=c99'])
+
+executable('prog', 'prog.c')
+
+# Check that native: true does not affect the use of c_std in
+# non-cross builds
+
+if not meson.is_cross_build()
+ executable('prog2', 'prog.c', native: true)
+
+ # Check that even deps marked as native are found
+ # by default when not cross compiling.
+ dependency('ylib', method: 'pkg-config')
+endif
diff --git a/meson/test cases/unit/51 noncross options/prog.c b/meson/test cases/unit/51 noncross options/prog.c
new file mode 100644
index 000000000..0314ff17b
--- /dev/null
+++ b/meson/test cases/unit/51 noncross options/prog.c
@@ -0,0 +1 @@
+int main(int argc, char **argv) { return 0; }
diff --git a/meson/test cases/unit/51 noncross options/ylib.pc b/meson/test cases/unit/51 noncross options/ylib.pc
new file mode 100644
index 000000000..afec2d3f7
--- /dev/null
+++ b/meson/test cases/unit/51 noncross options/ylib.pc
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib/x86_64-linux-gnu
+sharedlibdir=${libdir}
+includedir=${prefix}/include
+
+Name: ylib
+Description: ylib compression library
+Version: 1.2.3
+
+Requires:
+Libs: -L${libdir} -L${sharedlibdir} -ly
+Cflags: -I${includedir}