From a44221db06792ce127529b4e8c79c15e33d973a5 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 15 Dec 2017 16:16:49 -0800 Subject: [PATCH] tests: Add freebsd to get define test. --- test cases/common/140 get define/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test cases/common/140 get define/meson.build b/test cases/common/140 get define/meson.build index e23b7dedb..e85474200 100644 --- a/test cases/common/140 get define/meson.build +++ b/test cases/common/140 get define/meson.build @@ -19,6 +19,13 @@ foreach lang : ['c', 'cpp'] elif host_system == 'haiku' d = cc.get_define('__HAIKU__') assert(d == '1', '__HAIKU__ value is @0@ instead of 1'.format(d)) + elif host_system == 'freebsd' + # the __FreeBSD__ define will be equal to the major version of the release + # (ex, in FreeBSD 11.x, __FreeBSD__ == 11). To make the test robust when + # being run on various versions of FreeBSD, just test that the define is + # set. + d = cc.get_define('__FreeBSD__') + assert(d != '', '__FreeBSD__ value is unset') else error('Please report a bug and help us improve support for this platform') endif