Skip to content

Commit 940dcf6

Browse files
authored
OCMock for Mac tests (flutter#399)
Gets ocmock set up so that it can be used by the Mac unit tests (in flutter/engine#20531).
1 parent a5d7e3e commit 940dcf6

File tree

1 file changed

+12
-5
lines changed
  • build/secondary/third_party/ocmock

1 file changed

+12
-5
lines changed

build/secondary/third_party/ocmock/BUILD.gn

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
assert(is_ios)
6-
75
ocmock_path = "//third_party/ocmock/Source"
86

97
# OCMock headers use `#import <OCMock/Foo.h>`.
108
config("ocmock_config") {
119
include_dirs = [ "$ocmock_path" ]
1210
}
1311

14-
# This is a static library so it can be used by xcode's build system too.
15-
static_library("ocmock") {
12+
source_set("ocmock_src") {
1613
configs -= [ "//build/config/compiler:chromium_code" ]
1714
all_dependent_configs = [ ":ocmock_config" ]
1815
cflags = [
1916
"-fvisibility=default",
20-
"-mios-simulator-version-min=$ios_testing_deployment_target",
2117
"-Wno-misleading-indentation",
2218
]
2319
sources = [
@@ -92,3 +88,14 @@ static_library("ocmock") {
9288
]
9389
}
9490

91+
# This is a static library so it can be used by xcode's build system too.
92+
static_library("ocmock") {
93+
if (is_ios) {
94+
cflags = [
95+
"-mios-simulator-version-min=$ios_testing_deployment_target",
96+
]
97+
}
98+
public_deps = [
99+
":ocmock_src",
100+
]
101+
}

0 commit comments

Comments
 (0)