Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.
Merged
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
23 changes: 17 additions & 6 deletions build/secondary/third_party/ocmock/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ config("ocmock_config") {
include_dirs = [ "$ocmock_path" ]
}

static_library("ocmock") {
# Target that compiles all sources to .o files but does not produce a static
# library for use in macOS desktop tests.
source_set("ocmock_src") {
configs -= [ "//build/config/compiler:chromium_code" ]
all_dependent_configs = [ ":ocmock_config" ]
cflags = [
"-fvisibility=default",
"-Wno-misleading-indentation",
]
if (is_ios) {
cflags += [
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
}
sources = [
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.h",
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.m",
Expand Down Expand Up @@ -96,3 +93,17 @@ static_library("ocmock") {
"$ocmock_path/OCMock/OCProtocolMockObject.m",
]
}

# Generates a static library, used in iOS unit test targets
static_library("ocmock") {
# Force the static lib to include code from dependencies
complete_static_lib = true
if (is_ios) {
cflags = [
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
}
public_deps = [
":ocmock_src",
]
}