Commit 4b8b650c by Corentin Wallez Committed by Commit Bot

BUILD.gn: prepare dEQP test support on Mac

BUG=angleproject:1569 Change-Id: I77aa55d28b884fa648ff52aedddf3a23fe6e4a8c Reviewed-on: https://chromium-review.googlesource.com/713194 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 454c34cb
......@@ -276,6 +276,7 @@ static_library("angle_gpu_info_util") {
libs += [
"IOKit.framework",
"CoreFoundation.framework",
"CoreGraphics.framework",
]
}
}
......
......@@ -384,6 +384,11 @@ if (build_angle_deqp_tests) {
public_configs = [ ":angle_deqp_gtest_support_config" ]
sources = deqp_gypi.deqp_gpu_test_expectations_sources
if (is_mac) {
sources += deqp_gypi.deqp_gpu_test_expectations_sources_mac
libs = [ "Cocoa.framework" ]
}
if (build_with_chromium) {
sources += [ "//gpu/angle_deqp_tests_main.cc" ]
} else {
......
......@@ -1198,6 +1198,11 @@
'third_party/gpu_test_expectations/gpu_test_expectations_parser.cc',
'third_party/gpu_test_expectations/gpu_test_expectations_parser.h',
],
'deqp_gpu_test_expectations_sources_mac':
[
'third_party/gpu_test_expectations/gpu_test_config_mac.mm',
'third_party/gpu_test_expectations/gpu_test_config_mac.h',
],
'conditions':
[
['(OS=="win" or OS=="linux" or OS=="mac")',
......@@ -1857,8 +1862,7 @@
{
'sources':
[
'third_party/gpu_test_expectations/gpu_test_config_mac.h',
'third_party/gpu_test_expectations/gpu_test_config_mac.mm',
'<@(deqp_gpu_test_expectations_sources_mac)',
],
}],
],
......
......@@ -9,8 +9,6 @@
#import <Cocoa/Cocoa.h>
namespace base {
// OSX 10.8 deprecates Gestalt but doesn't make the operatingSystemVersion property part of the
// public interface of NSProcessInfo until 10.10. Add a forward declaration.
#if !defined(MAC_OS_X_VERSION_10_10) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10
......@@ -19,19 +17,32 @@ namespace base {
@end
#endif
namespace base
{
void SysInfo::OperatingSystemVersionNumbers(int32_t *major_version,
int32_t *minor_version,
int32_t *bugfix_version)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
Gestalt(gestaltSystemVersionMajor, reinterpret_cast<SInt32*>(major_version));
Gestalt(gestaltSystemVersionMinor, reinterpret_cast<SInt32*>(minor_version));
Gestalt(gestaltSystemVersionBugFix, reinterpret_cast<SInt32*>(bugfix_version));
Gestalt(gestaltSystemVersionMajor, reinterpret_cast<SInt32 *>(major_version));
Gestalt(gestaltSystemVersionMinor, reinterpret_cast<SInt32 *>(minor_version));
Gestalt(gestaltSystemVersionBugFix, reinterpret_cast<SInt32 *>(bugfix_version));
#else
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
*major_version = version.majorVersion;
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
if (@available(macOS 10.10, *))
{
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
*major_version = version.majorVersion;
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
}
else
{
// This can only happen on 10.9
*major_version = 10;
*minor_version = 9;
*bugfix_version = 0;
}
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment