Debian Codegraph @

src/objective-c/manual_tests/Podfile

raw
1 source 'https://github.com/CocoaPods/Specs.git'
2 platform :ios, '9.0'
3
4 install! 'cocoapods', :deterministic_uuids => false
5
6 # Location of gRPC's repo root relative to this file.
7 GRPC_LOCAL_SRC = '../../..'
8
9 # Install the dependencies in the main target plus all test targets.
10 %w(
11 GrpcIosTest
12 ).each do |target_name|
13 target target_name do
14 pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true
15
16 pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c"
17 pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c"
18
19 pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true
20
21 pod 'gRPC/CFStream', :path => GRPC_LOCAL_SRC
22 pod 'gRPC-Core/CFStream-Implementation', :path => GRPC_LOCAL_SRC
23 pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC
24 pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true
25 pod 'RemoteTest', :path => "../tests/RemoteTestClient", :inhibit_warnings => true
26 end
27 end
28
29 post_install do |installer|
30 installer.pods_project.targets.each do |target|
31 target.build_configurations.each do |config|
32 config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
33 end
34
35 # CocoaPods creates duplicated library targets of gRPC-Core when the test targets include
36 # non-default subspecs of gRPC-Core. All of these library targets start with prefix 'gRPC-Core'
37 # and require the same error suppresion.
38 if target.name.start_with?('gRPC-Core')
39 target.build_configurations.each do |config|
40 # TODO(zyc): Remove this setting after the issue is resolved
41 # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
42 # function" warning
43 config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'
44 # Abseil isn't free from the following warning
45 config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
46 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1'
47 end
48 end
49
50 # Activate Cronet for the dedicated build configuration 'Cronet', which will be used solely by
51 # the test target 'InteropTestsRemoteWithCronet'
52 # Activate GRPCCall+InternalTests functions for the dedicated build configuration 'Test', which will
53 # be used by all test targets using it.
54 if target.name == 'gRPC' || target.name.start_with?('gRPC.')
55 target.build_configurations.each do |config|
56 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_TEST_OBJC=1'
57 end
58 end
59
60 # Enable NSAssert on gRPC
61 if target.name == 'gRPC' || target.name.start_with?('gRPC.') ||
62 target.name == 'ProtoRPC' || target.name.start_with?('ProtoRPC.') ||
63 target.name == 'RxLibrary' || target.name.start_with?('RxLibrary.')
64 target.build_configurations.each do |config|
65 if config.name != 'Release'
66 config.build_settings['ENABLE_NS_ASSERTIONS'] = 'YES'
67 end
68 end
69 end
70 end
71 end