From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/osx/3 has function xcode8/meson.build | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test cases/osx/3 has function xcode8/meson.build (limited to 'test cases/osx/3 has function xcode8/meson.build') diff --git a/test cases/osx/3 has function xcode8/meson.build b/test cases/osx/3 has function xcode8/meson.build new file mode 100644 index 0000000..edd3688 --- /dev/null +++ b/test cases/osx/3 has function xcode8/meson.build @@ -0,0 +1,30 @@ +project('has function xcode8', 'c') + +cc = meson.get_compiler('c') + +# XCode 8 location for the macOS 10.12 SDK +sdk_args = ['-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk'] +args_10_11 = ['-mmacosx-version-min=10.11'] + sdk_args +args_10_12 = ['-mmacosx-version-min=10.12'] + sdk_args + +# XCode 9 location for the macOS 10.13 SDK +sdk_args = ['-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk'] +args_10_12 = ['-mmacosx-version-min=10.13'] + sdk_args + +# Test requires XCode 8 which has the MacOSX 10.12 SDK +if cc.version().version_compare('>=8.0') and cc.version().version_compare('<8.1') + if cc.has_function('clock_gettime', args : args_10_11, prefix : '#include ') + error('Should not have found clock_gettime via when targeting Mac OS X 10.11') + endif + if not cc.has_function('clock_gettime', args : args_10_12, prefix : '#include ') + error('Did NOT find clock_gettime via when targeting Mac OS X 10.12') + endif + if not cc.has_function('clock_gettime', args : args_10_11) + error('Did NOT find clock_gettime w/o a prototype when targeting Mac OS X 10.11') + endif + if not cc.has_function('clock_gettime', args : args_10_12) + error('Did NOT find clock_gettime w/o a prototype when targeting Mac OS X 10.12') + endif +else + error('MESON_SKIP_TEST Test needs XCode 8.') +endif -- cgit v1.2.3