diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-22 15:35:17 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-22 15:35:17 +0200 |
commit | 78d31cafd73ef7df0e842efc822a8778fe4f9761 (patch) | |
tree | 95d1012dd6203066baba872d4ed7e01c9d2d04fc | |
parent | 40e8e203d53381a2fcb33a65d6b49956c33a27f5 (diff) | |
download | meson-78d31cafd73ef7df0e842efc822a8778fe4f9761.zip meson-78d31cafd73ef7df0e842efc822a8778fe4f9761.tar.gz meson-78d31cafd73ef7df0e842efc822a8778fe4f9761.tar.bz2 |
Looser alignment checks. Closes #58.
-rw-r--r-- | test cases/common/45 alignment/meson.build | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test cases/common/45 alignment/meson.build b/test cases/common/45 alignment/meson.build index 0dd8df5..2ec3f89 100644 --- a/test cases/common/45 alignment/meson.build +++ b/test cases/common/45 alignment/meson.build @@ -11,13 +11,18 @@ endif ptr_size = cc.sizeof('void*') dbl_alignment = cc.alignment('double') -if host.name() == 'windows' - dbl_exp = 8 +# These tests are not thorough. Doing this properly +# would take a lot of work because it is strongly +# platform and compiler dependent. So just check +# that they produce something fairly sane. + +if ptr_size == 8 or ptr_size == 4 + message('Size of ptr ok.') else - dbl_exp = ptr_size + error('Size of ptr misdetected.') endif -if dbl_alignment == dbl_exp +if dbl_alignment == 8 or dbl_alignment == 4 message('Alignment of double ok.') else error('Alignment of double misdetected.') |