This repository was archived by the owner on Apr 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 254
added ocmock build file #364
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
| ] | ||
| } | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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_targetso it seems like it should be used the same way.There was a problem hiding this comment.
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_targetis used in//build/toolchain/mac/BUILD.gnwhich applies that variable to all iOS targets. This is unlikeios_testing_deployment_targethere which targets need to apply themselves (like in the case ofocmock).Eh, this is only used in target. We can figure out how to make this consistent later.