aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-07-30 22:06:42 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-07-30 22:06:42 +0300
commit44c0e223305e295f61fcfe1d52967c19731fbe1f (patch)
treeca3bf14c770f6844ce69b651bdd61fe42b1d67b1 /test cases
parent6ba724c5c792b1683aeee5f42ea9d836d2d75d84 (diff)
downloadmeson-44c0e223305e295f61fcfe1d52967c19731fbe1f.zip
meson-44c0e223305e295f61fcfe1d52967c19731fbe1f.tar.gz
meson-44c0e223305e295f61fcfe1d52967c19731fbe1f.tar.bz2
Can check for members in structures.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/44 has member/meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/test cases/common/44 has member/meson.build b/test cases/common/44 has member/meson.build
new file mode 100644
index 0000000..fa01877
--- /dev/null
+++ b/test cases/common/44 has member/meson.build
@@ -0,0 +1,11 @@
+project('has member', 'c')
+
+cc = meson.get_compiler('c')
+
+if not cc.has_member('struct tm', 'tm_sec', prefix : '#include<time.h>')
+ error('Did not detect member that exists.')
+endif
+
+if cc.has_member('struct tm', 'tm_nonexistent', prefix : '#include<time.h>')
+ error('Not existing member found.')
+endif