Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/config/ios/ios_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ declare_args() {

# The path to the iOS simulator SDK.
ios_simulator_sdk_path = ""

# Version of iOS that we're targeting for tests.
ios_testing_deployment_target = "13.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables here apply to all targets (ldflags from the variables defined here are specified in build/toolchain/mac/BUILD.gn). Is there a reason tests can't be run on older simulators? In that case, you can just modify the toolchain definition.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require us to edit OCMock's source code. The variable is meant to be a mirror to ios_deployment_target so it seems like it should be used the same way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, so its enforced by a dependency. ios_deployment_target is used in //build/toolchain/mac/BUILD.gn which applies that variable to all iOS targets. This is unlike ios_testing_deployment_target here which targets need to apply themselves (like in the case of ocmock).

Eh, this is only used in target. We can figure out how to make this consistent later.

}

if (ios_sdk_path == "") {
Expand Down
94 changes: 94 additions & 0 deletions build/secondary/third_party/ocmock/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_ios)

ocmock_path = "//third_party/ocmock/Source"

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

# This is a static library so it can be used by xcode's build system too.
static_library("ocmock") {
configs -= [ "//build/config/compiler:chromium_code" ]
all_dependent_configs = [ ":ocmock_config" ]
cflags = [
"-fvisibility=default",
"-mios-simulator-version-min=$ios_testing_deployment_target",
"-Wno-misleading-indentation",
]
sources = [
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.h",
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.m",
"$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.h",
"$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.m",
"$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.h",
"$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.m",
"$ocmock_path/OCMock/NSObject+OCMAdditions.h",
"$ocmock_path/OCMock/NSObject+OCMAdditions.m",
"$ocmock_path/OCMock/NSValue+OCMAdditions.h",
"$ocmock_path/OCMock/NSValue+OCMAdditions.m",
"$ocmock_path/OCMock/OCClassMockObject.h",
"$ocmock_path/OCMock/OCClassMockObject.m",
"$ocmock_path/OCMock/OCMArg.h",
"$ocmock_path/OCMock/OCMArg.m",
"$ocmock_path/OCMock/OCMArgAction.h",
"$ocmock_path/OCMock/OCMArgAction.m",
"$ocmock_path/OCMock/OCMBlockArgCaller.h",
"$ocmock_path/OCMock/OCMBlockArgCaller.m",
"$ocmock_path/OCMock/OCMBlockCaller.h",
"$ocmock_path/OCMock/OCMBlockCaller.m",
"$ocmock_path/OCMock/OCMBoxedReturnValueProvider.h",
"$ocmock_path/OCMock/OCMBoxedReturnValueProvider.m",
"$ocmock_path/OCMock/OCMConstraint.h",
"$ocmock_path/OCMock/OCMConstraint.m",
"$ocmock_path/OCMock/OCMExceptionReturnValueProvider.h",
"$ocmock_path/OCMock/OCMExceptionReturnValueProvider.m",
"$ocmock_path/OCMock/OCMExpectationRecorder.h",
"$ocmock_path/OCMock/OCMExpectationRecorder.m",
"$ocmock_path/OCMock/OCMFunctions.h",
"$ocmock_path/OCMock/OCMFunctions.m",
"$ocmock_path/OCMock/OCMFunctionsPrivate.h",
"$ocmock_path/OCMock/OCMIndirectReturnValueProvider.h",
"$ocmock_path/OCMock/OCMIndirectReturnValueProvider.m",
"$ocmock_path/OCMock/OCMInvocationExpectation.h",
"$ocmock_path/OCMock/OCMInvocationExpectation.m",
"$ocmock_path/OCMock/OCMInvocationMatcher.h",
"$ocmock_path/OCMock/OCMInvocationMatcher.m",
"$ocmock_path/OCMock/OCMInvocationStub.h",
"$ocmock_path/OCMock/OCMInvocationStub.m",
"$ocmock_path/OCMock/OCMLocation.h",
"$ocmock_path/OCMock/OCMLocation.m",
"$ocmock_path/OCMock/OCMMacroState.h",
"$ocmock_path/OCMock/OCMMacroState.m",
"$ocmock_path/OCMock/OCMNotificationPoster.h",
"$ocmock_path/OCMock/OCMNotificationPoster.m",
"$ocmock_path/OCMock/OCMObserverRecorder.h",
"$ocmock_path/OCMock/OCMObserverRecorder.m",
"$ocmock_path/OCMock/OCMPassByRefSetter.h",
"$ocmock_path/OCMock/OCMPassByRefSetter.m",
"$ocmock_path/OCMock/OCMRealObjectForwarder.h",
"$ocmock_path/OCMock/OCMRealObjectForwarder.m",
"$ocmock_path/OCMock/OCMRecorder.h",
"$ocmock_path/OCMock/OCMRecorder.m",
"$ocmock_path/OCMock/OCMReturnValueProvider.h",
"$ocmock_path/OCMock/OCMReturnValueProvider.m",
"$ocmock_path/OCMock/OCMStubRecorder.h",
"$ocmock_path/OCMock/OCMStubRecorder.m",
"$ocmock_path/OCMock/OCMVerifier.h",
"$ocmock_path/OCMock/OCMVerifier.m",
"$ocmock_path/OCMock/OCMock.h",
"$ocmock_path/OCMock/OCMockObject.h",
"$ocmock_path/OCMock/OCMockObject.m",
"$ocmock_path/OCMock/OCObserverMockObject.h",
"$ocmock_path/OCMock/OCObserverMockObject.m",
"$ocmock_path/OCMock/OCPartialMockObject.h",
"$ocmock_path/OCMock/OCPartialMockObject.m",
"$ocmock_path/OCMock/OCProtocolMockObject.h",
"$ocmock_path/OCMock/OCProtocolMockObject.m",
]
}