Skip to content

Commit e20b694

Browse files
David Kilzerddkilzer
authored andcommitted
[WebRTC] Add target for sdp_integration_fuzzer
https://bugs.webkit.org/show_bug.cgi?id=263225 <rdar://117044163> Reviewed by Youenn Fablet. This commit adds support for building the sdp_integration_fuzzer. This requires a number of high-level changes: - Add the gmock project to WebKit. This is from the same upsteram revision as gtest (1a8ecf1813d022cc7914e04564b92decff6161fc). - Sharing xcconfig settings by extracting new Base-*.xcconfig files. - When building with libFuzzer, make it easy to link to any symbol: - Export all symbols from libwebrtc.dylib by disabling the export file. - Force-load all symbols from static libraries in libwebrtc.dylib. - Build fixes after force-loading symbols from static libraries. * Source/ThirdParty/gmock/CMakeLists.txt: Add. * Source/ThirdParty/gmock/Configurations/Base.xcconfig: Add. * Source/ThirdParty/gmock/Configurations/DebugRelease.xcconfig: Add. * Source/ThirdParty/gmock/Configurations/gmock.xcconfig: Add. * Source/ThirdParty/gmock/Configurations/gmock_main.xcconfig: Add. * Source/ThirdParty/gmock/LICENSE: Add. * Source/ThirdParty/gmock/README.WebKit: Add. * Source/ThirdParty/gmock/README.md: Add. * Source/ThirdParty/gmock/cmake/gmock.pc.in: Add. * Source/ThirdParty/gmock/cmake/gmock_main.pc.in: Add. * Source/ThirdParty/gmock/docs/README.md: Add. * Source/ThirdParty/gmock/gmock.xcodeproj/project.pbxproj: Add. * Source/ThirdParty/gmock/include/gmock/gmock-actions.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-cardinalities.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-function-mocker.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-matchers.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-more-actions.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-more-matchers.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-nice-strict.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock-spec-builders.h: Add. * Source/ThirdParty/gmock/include/gmock/gmock.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/custom/README.md: Add. * Source/ThirdParty/gmock/include/gmock/internal/custom/gmock-generated-actions.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/custom/gmock-matchers.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/custom/gmock-port.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/gmock-internal-utils.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/gmock-port.h: Add. * Source/ThirdParty/gmock/include/gmock/internal/gmock-pp.h: Add. * Source/ThirdParty/gmock/scripts/README.md: Add. * Source/ThirdParty/gmock/scripts/fuse_gmock_files.py: Add. * Source/ThirdParty/gmock/scripts/generator/LICENSE: Add. * Source/ThirdParty/gmock/scripts/generator/README: Add. * Source/ThirdParty/gmock/scripts/generator/README.cppclean: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/__init__.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/ast.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/gmock_class.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/gmock_class_test.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/keywords.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/tokenize.py: Add. * Source/ThirdParty/gmock/scripts/generator/cpp/utils.py: Add. * Source/ThirdParty/gmock/scripts/generator/gmock_gen.py: Add. * Source/ThirdParty/gmock/src/gmock-all.cc: Add. * Source/ThirdParty/gmock/src/gmock-cardinalities.cc: Add. * Source/ThirdParty/gmock/src/gmock-internal-utils.cc: Add. * Source/ThirdParty/gmock/src/gmock-matchers.cc: Add. * Source/ThirdParty/gmock/src/gmock-spec-builders.cc: Add. * Source/ThirdParty/gmock/src/gmock.cc: Add. * Source/ThirdParty/gmock/src/gmock_main.cc: Add. * Source/ThirdParty/gmock/test/BUILD.bazel: Add. * Source/ThirdParty/gmock/test/gmock-actions_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-cardinalities_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-function-mocker_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-internal-utils_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-matchers_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-more-actions_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-nice-strict_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-port_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-pp-string_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-pp_test.cc: Add. * Source/ThirdParty/gmock/test/gmock-spec-builders_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_all_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_ex_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_leak_test.py: Add. * Source/ThirdParty/gmock/test/gmock_leak_test_.cc: Add. * Source/ThirdParty/gmock/test/gmock_link2_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_link_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_link_test.h: Add. * Source/ThirdParty/gmock/test/gmock_output_test.py: Add. * Source/ThirdParty/gmock/test/gmock_output_test_.cc: Add. * Source/ThirdParty/gmock/test/gmock_output_test_golden.txt: Add. * Source/ThirdParty/gmock/test/gmock_stress_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_test.cc: Add. * Source/ThirdParty/gmock/test/gmock_test_utils.py: Add. - Add gmock project, including new Xcode project with Configurations folder. * Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig: Add. - Extract shared settings from libwebrtc.xcconfig. * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig: - Disable symbol exports when building with libFuzzer. - Force-load all symbols from static libraries when building with libFuzzer. * Source/ThirdParty/libwebrtc/Configurations/opus.xcconfig: (GCC_PREPROCESSOR_DEFINITIONS): - Add WEBRTC_WEBKIT_BUILD since this is now used in opus sources. * Source/ThirdParty/libwebrtc/Configurations/sdp_integration_fuzzer.xcconfig: Add. * Source/ThirdParty/libwebrtc/Source/third_party/opus/src/silk/sort.c: - Fix build with force-load of libopus.a by compiling silk_insertion_sort_decreasing_int16(). * Source/ThirdParty/libwebrtc/Source/webrtc/test/fuzzers/sdp_integration_fuzzer.cc: - Comment out `!HasFailure()` check. * Source/ThirdParty/libwebrtc/Source/webrtc/test/gmock.h: * Source/ThirdParty/libwebrtc/Source/webrtc/test/gtest.h: - Fix header include paths for gmock and gtest. * Source/ThirdParty/libwebrtc/WebKit/sdp_integration_fuzzer-libwebrtc.diff: Add. * Source/ThirdParty/libwebrtc/WebKit/sdp_integration_fuzzer-opus.diff: Add. * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: (libwebrtc target): - Remove static libraries that are now linked via libwebrtc.xcconfig. - Remove fake_video_renderer.h as a public header. - Remove vp9_firstpass.{c,h} as they are not needed. (Generate Export Files): - Do not generate an export file when building with libFuzzer. (Check for Weak VTables and Externals): - Do not check for weak vtables and externals when building with libFuzzer. (Fuzzers (libwebrtc)): Add. - Add aggregate target for all libwebrtc fuzzers. (sdp_integration_fuzzer target): Add. - Add target for new fuzzer. * Tools/Scripts/webkitpy/style/checker.py: (_PATH_RULES_SPECIFIER): - Ignore format of Python source in gmock project. (_all_categories): - Add CMakeChecker.categories so they can be ignored for the gmock project. * Tools/Scripts/webkitpy/style/checkers/cmake.py: (CMakeChecker.categories): Add. Canonical link: https://commits.webkit.org/269462@main
1 parent 2e494e5 commit e20b694

File tree

86 files changed

+38946
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+38946
-42
lines changed
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
########################################################################
2+
# Note: CMake support is community-based. The maintainers do not use CMake
3+
# internally.
4+
#
5+
# CMake build script for Google Mock.
6+
#
7+
# To run the tests for Google Mock itself on Linux, use 'make test' or
8+
# ctest. You can select which tests to run using 'ctest -R regex'.
9+
# For more options, run 'ctest --help'.
10+
11+
option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
12+
13+
# A directory to find Google Test sources.
14+
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt")
15+
set(gtest_dir gtest)
16+
else()
17+
set(gtest_dir ../googletest)
18+
endif()
19+
20+
# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
21+
include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL)
22+
23+
if (COMMAND pre_project_set_up_hermetic_build)
24+
# Google Test also calls hermetic setup functions from add_subdirectory,
25+
# although its changes will not affect things at the current scope.
26+
pre_project_set_up_hermetic_build()
27+
endif()
28+
29+
########################################################################
30+
#
31+
# Project-wide settings
32+
33+
# Name of the project.
34+
#
35+
# CMake files in this project can refer to the root source directory
36+
# as ${gmock_SOURCE_DIR} and to the root binary directory as
37+
# ${gmock_BINARY_DIR}.
38+
# Language "C" is required for find_package(Threads).
39+
if (CMAKE_VERSION VERSION_LESS 3.0)
40+
project(gmock CXX C)
41+
else()
42+
cmake_policy(SET CMP0048 NEW)
43+
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
44+
endif()
45+
cmake_minimum_required(VERSION 2.8.12)
46+
47+
if (COMMAND set_up_hermetic_build)
48+
set_up_hermetic_build()
49+
endif()
50+
51+
# Instructs CMake to process Google Test's CMakeLists.txt and add its
52+
# targets to the current scope. We are placing Google Test's binary
53+
# directory in a subdirectory of our own as VC compilation may break
54+
# if they are the same (the default).
55+
add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}")
56+
57+
58+
# These commands only run if this is the main project
59+
if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
60+
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
61+
# make it prominent in the GUI.
62+
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
63+
else()
64+
mark_as_advanced(gmock_build_tests)
65+
endif()
66+
67+
# Although Google Test's CMakeLists.txt calls this function, the
68+
# changes there don't affect the current scope. Therefore we have to
69+
# call it again here.
70+
config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
71+
72+
# Adds Google Mock's and Google Test's header directories to the search path.
73+
set(gmock_build_include_dirs
74+
"${gmock_SOURCE_DIR}/include"
75+
"${gmock_SOURCE_DIR}"
76+
"${gtest_SOURCE_DIR}/include"
77+
# This directory is needed to build directly from Google Test sources.
78+
"${gtest_SOURCE_DIR}")
79+
include_directories(${gmock_build_include_dirs})
80+
81+
########################################################################
82+
#
83+
# Defines the gmock & gmock_main libraries. User tests should link
84+
# with one of them.
85+
86+
# Google Mock libraries. We build them using more strict warnings than what
87+
# are used for other targets, to ensure that Google Mock can be compiled by
88+
# a user aggressive about warnings.
89+
if (MSVC)
90+
cxx_library(gmock
91+
"${cxx_strict}"
92+
"${gtest_dir}/src/gtest-all.cc"
93+
src/gmock-all.cc)
94+
95+
cxx_library(gmock_main
96+
"${cxx_strict}"
97+
"${gtest_dir}/src/gtest-all.cc"
98+
src/gmock-all.cc
99+
src/gmock_main.cc)
100+
else()
101+
cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
102+
target_link_libraries(gmock PUBLIC gtest)
103+
set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION})
104+
cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
105+
target_link_libraries(gmock_main PUBLIC gmock)
106+
set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
107+
endif()
108+
# If the CMake version supports it, attach header directory information
109+
# to the targets for when we are part of a parent build (ie being pulled
110+
# in via add_subdirectory() rather than being a standalone build).
111+
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
112+
target_include_directories(gmock SYSTEM INTERFACE
113+
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>"
114+
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
115+
target_include_directories(gmock_main SYSTEM INTERFACE
116+
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>"
117+
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
118+
endif()
119+
120+
########################################################################
121+
#
122+
# Install rules
123+
install_project(gmock gmock_main)
124+
125+
########################################################################
126+
#
127+
# Google Mock's own tests.
128+
#
129+
# You can skip this section if you aren't interested in testing
130+
# Google Mock itself.
131+
#
132+
# The tests are not built by default. To build them, set the
133+
# gmock_build_tests option to ON. You can do it by running ccmake
134+
# or specifying the -Dgmock_build_tests=ON flag when running cmake.
135+
136+
if (gmock_build_tests)
137+
# This must be set in the root directory for the tests to be run by
138+
# 'make test' or ctest.
139+
enable_testing()
140+
141+
if (MINGW OR CYGWIN)
142+
if (CMAKE_VERSION VERSION_LESS "2.8.12")
143+
add_compile_options("-Wa,-mbig-obj")
144+
else()
145+
add_definitions("-Wa,-mbig-obj")
146+
endif()
147+
endif()
148+
149+
############################################################
150+
# C++ tests built with standard compiler flags.
151+
152+
cxx_test(gmock-actions_test gmock_main)
153+
cxx_test(gmock-cardinalities_test gmock_main)
154+
cxx_test(gmock_ex_test gmock_main)
155+
cxx_test(gmock-function-mocker_test gmock_main)
156+
cxx_test(gmock-internal-utils_test gmock_main)
157+
cxx_test(gmock-matchers_test gmock_main)
158+
cxx_test(gmock-more-actions_test gmock_main)
159+
cxx_test(gmock-nice-strict_test gmock_main)
160+
cxx_test(gmock-port_test gmock_main)
161+
cxx_test(gmock-spec-builders_test gmock_main)
162+
cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc)
163+
cxx_test(gmock_test gmock_main)
164+
165+
if (DEFINED GTEST_HAS_PTHREAD)
166+
cxx_test(gmock_stress_test gmock)
167+
endif()
168+
169+
# gmock_all_test is commented to save time building and running tests.
170+
# Uncomment if necessary.
171+
# cxx_test(gmock_all_test gmock_main)
172+
173+
############################################################
174+
# C++ tests built with non-standard compiler flags.
175+
176+
if (MSVC)
177+
cxx_library(gmock_main_no_exception "${cxx_no_exception}"
178+
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
179+
180+
cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
181+
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
182+
183+
else()
184+
cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc)
185+
target_link_libraries(gmock_main_no_exception PUBLIC gmock)
186+
187+
cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc)
188+
target_link_libraries(gmock_main_no_rtti PUBLIC gmock)
189+
endif()
190+
cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}"
191+
gmock_main_no_exception test/gmock-more-actions_test.cc)
192+
193+
cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}"
194+
gmock_main_no_rtti test/gmock-spec-builders_test.cc)
195+
196+
cxx_shared_library(shared_gmock_main "${cxx_default}"
197+
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
198+
199+
# Tests that a binary can be built with Google Mock as a shared library. On
200+
# some system configurations, it may not possible to run the binary without
201+
# knowing more details about the system configurations. We do not try to run
202+
# this binary. To get a more robust shared library coverage, configure with
203+
# -DBUILD_SHARED_LIBS=ON.
204+
cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}"
205+
shared_gmock_main test/gmock-spec-builders_test.cc)
206+
set_target_properties(shared_gmock_test_
207+
PROPERTIES
208+
COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
209+
210+
############################################################
211+
# Python tests.
212+
213+
cxx_executable(gmock_leak_test_ test gmock_main)
214+
py_test(gmock_leak_test)
215+
216+
cxx_executable(gmock_output_test_ test gmock)
217+
py_test(gmock_output_test)
218+
endif()
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// Copyright (C) 2023 Apple Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions
5+
// are met:
6+
// 1. Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// 2. Redistributions in binary form must reproduce the above copyright
9+
// notice, this list of conditions and the following disclaimer in the
10+
// documentation and/or other materials provided with the distribution.
11+
//
12+
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13+
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
16+
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17+
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19+
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20+
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
#include "../../../../Configurations/CommonBase.xcconfig"
25+
26+
CODE_SIGN_IDENTITY = -;
27+
28+
ALWAYS_SEARCH_USER_PATHS = NO;
29+
30+
CLANG_CXX_LANGUAGE_STANDARD = c++2a;
31+
CLANG_CXX_LIBRARY = libc++;
32+
CLANG_ENABLE_OBJC_ARC = YES;
33+
CLANG_ENABLE_OBJC_WEAK = YES;
34+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
35+
CLANG_WARN_BOOL_CONVERSION = YES;
36+
CLANG_WARN_COMMA = YES;
37+
CLANG_WARN_CONSTANT_CONVERSION = YES;
38+
CLANG_WARN_CXX0X_EXTENSIONS = NO;
39+
CLANG_WARN_EMPTY_BODY = YES;
40+
CLANG_WARN_ENUM_CONVERSION = YES;
41+
CLANG_WARN_INFINITE_RECURSION = YES;
42+
CLANG_WARN_INT_CONVERSION = YES;
43+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
44+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
45+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
46+
CLANG_WARN_STRICT_PROTOTYPES = YES;
47+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
48+
CLANG_WARN_UNREACHABLE_CODE = YES;
49+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
50+
COMBINE_HIDPI_IMAGES = NO;
51+
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
52+
ENABLE_BITCODE = NO;
53+
ENABLE_STRICT_OBJC_MSGSEND = YES;
54+
GCC_C_LANGUAGE_STANDARD = gnu99;
55+
GCC_DEBUGGING_SYMBOLS = default;
56+
GCC_DYNAMIC_NO_PIC = NO;
57+
GCC_ENABLE_CPP_EXCEPTIONS = NO;
58+
GCC_ENABLE_CPP_RTTI = NO;
59+
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
60+
GCC_ENABLE_SYMBOL_SEPARATION = NO;
61+
GCC_FAST_OBJC_DISPATCH = YES;
62+
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
63+
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
64+
GCC_NO_COMMON_BLOCKS = YES;
65+
GCC_OBJC_CALL_CXX_CDTORS = YES;
66+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
67+
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(inherited);
68+
GCC_STRICT_ALIASING = YES;
69+
GCC_THREADSAFE_STATICS = NO;
70+
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
71+
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
72+
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
73+
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
74+
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
75+
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
76+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
77+
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
78+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
79+
GCC_WARN_SIGN_COMPARE = YES;
80+
GCC_WARN_UNDECLARED_SELECTOR = YES;
81+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
82+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
83+
GCC_WARN_UNUSED_FUNCTION = YES;
84+
GCC_WARN_UNUSED_VARIABLE = YES;
85+
PREBINDING = NO;
86+
WARNING_CFLAGS = $(inherited) -Wcast-qual -Wchar-subscripts -Wextra-tokens -Winit-self -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety -Wno-comma -Wno-exit-time-destructors -Wno-global-constructors -Wno-inconsistent-missing-override -Wno-missing-prototypes -Wno-undef;
87+
88+
SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
89+
SUPPORTS_MACCATALYST = YES;
90+
91+
DEAD_CODE_STRIPPING = NO;
92+
93+
WK_DEFAULT_GCC_OPTIMIZATION_LEVEL = 0;
94+
95+
STRIP_INSTALLED_PRODUCT = NO;
96+
97+
SDKROOT = macosx.internal;
98+
ADDITIONAL_SDKS = $(WK_ADDITIONAL_SDKS);
99+
100+
// Define the DEBUG macro in all debug builds (like gtest).
101+
DEBUG_DEFINES = DEBUG=1;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (C) 2023 Apple Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions
5+
// are met:
6+
// 1. Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// 2. Redistributions in binary form must reproduce the above copyright
9+
// notice, this list of conditions and the following disclaimer in the
10+
// documentation and/or other materials provided with the distribution.
11+
//
12+
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13+
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
16+
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17+
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19+
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20+
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
#include "Base.xcconfig"
25+
#include? "../../../../LocalOverrides.xcconfig"
26+
27+
ONLY_ACTIVE_ARCH = YES;
28+
29+
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
30+
DEBUG_INFORMATION_FORMAT = dwarf;
31+
32+
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
33+
SDKROOT_ = macosx;
34+
SDKROOT_YES = macosx.internal;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright (C) 2023 Apple Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions
5+
// are met:
6+
// 1. Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// 2. Redistributions in binary form must reproduce the above copyright
9+
// notice, this list of conditions and the following disclaimer in the
10+
// documentation and/or other materials provided with the distribution.
11+
//
12+
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13+
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
16+
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17+
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19+
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20+
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
EXECUTABLE_PREFIX = lib;
25+
PRODUCT_NAME = gmock;
26+
27+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
28+
STRIP_INSTALLED_PRODUCT = NO;
29+
30+
INSTALLHDRS_SCRIPT_PHASE = YES;
31+
APPLY_RULES_IN_COPY_HEADERS = YES;
32+
33+
ALTERNATE_HEADER_SEARCH_PATHS = $(ALTERNATE_HEADER_SEARCH_PATHS_$(SDK_VARIANT));
34+
ALTERNATE_HEADER_SEARCH_PATHS_iosmac = $(BUILT_PRODUCTS_DIR)$(WK_ALTERNATE_FRAMEWORKS_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH);
35+
36+
HEADER_SEARCH_PATHS = ./include $(ALTERNATE_HEADER_SEARCH_PATHS) $(BUILT_PRODUCTS_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH);
37+
USE_HEADERMAP = NO;
38+
39+
PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/gmock;

0 commit comments

Comments
 (0)