|
1 |
| -COMMON_PREPROCESSOR_FLAGS = ['-fobjc-arc', '-Wno-deprecated-declarations', '-Wignored-attributes'] |
2 |
| - |
3 | 1 | apple_library(
|
4 |
| - name = 'PINCacheCore', |
5 |
| - exported_headers = glob([ |
6 |
| - 'PINCache/*.h', |
7 |
| - ]), |
8 |
| - header_path_prefix = 'PINCache', |
9 |
| - srcs = glob([ |
10 |
| - 'PINCache/*.m', |
11 |
| - ]), |
| 2 | + name = 'PINCache', |
| 3 | + exported_headers = glob(['PINCache/*.h']), |
| 4 | + # PINDiskCache.m should be compiled with '-fobjc-arc-exceptions' (#105) |
| 5 | + srcs = |
| 6 | + glob(['PINCache/*.m'], excludes = ['PINCache/PINDiskCache.m']) + |
| 7 | + [('PINCache/PINDiskCache.m', ['-fobjc-arc-exceptions'])], |
| 8 | + preprocessor_flags = ['-fobjc-arc'], |
12 | 9 | lang_preprocessor_flags = {
|
13 | 10 | 'C': ['-std=gnu99'],
|
14 |
| - 'CXX': ['-std=gnu++11'], |
| 11 | + 'CXX': ['-std=gnu++11', '-stdlib=libc++'], |
15 | 12 | },
|
16 |
| - preprocessor_flags = COMMON_PREPROCESSOR_FLAGS, |
17 |
| - frameworks = [ |
18 |
| - '$SDKROOT/System/Library/Frameworks/Foundation.framework', |
19 |
| - ], |
20 |
| - visibility = [ |
21 |
| - 'PUBLIC', |
22 |
| - ], |
23 |
| -) |
24 |
| - |
25 |
| -#PINCache iOS |
26 |
| -apple_library( |
27 |
| - name = 'PINCache', |
28 |
| - deps = [':PINCacheCore'], |
29 | 13 | linker_flags = [
|
30 | 14 | '-weak_framework',
|
31 | 15 | 'UIKit',
|
32 |
| - ], |
33 |
| - visibility = [ |
34 |
| - 'PUBLIC', |
35 |
| - ], |
36 |
| -) |
37 |
| - |
38 |
| -#PINCache MacOS |
39 |
| -apple_library( |
40 |
| - name = 'PINCacheMacOS', |
41 |
| - deps = [':PINCacheCore'], |
42 |
| - linker_flags = [ |
43 | 16 | '-weak_framework',
|
44 | 17 | 'AppKit',
|
45 | 18 | ],
|
46 |
| - visibility = [ |
47 |
| - 'PUBLIC', |
48 |
| - ], |
49 |
| -) |
50 |
| - |
51 |
| -apple_resource( |
52 |
| - name = 'TestAppResources', |
53 |
| - files = glob(['tests/PINCache/*.png']), |
54 |
| - dirs = [], |
55 |
| -) |
56 |
| - |
57 |
| -apple_bundle( |
58 |
| - name = 'TestApp', |
59 |
| - binary = ':TestAppBinary', |
60 |
| - extension = 'app', |
61 |
| - info_plist = 'tests/PINCache/PINCache-Info.plist', |
62 |
| - tests = [':Tests'], |
63 |
| -) |
64 |
| - |
65 |
| -apple_binary( |
66 |
| - name = 'TestAppBinary', |
67 |
| - prefix_header = 'tests/PINCache/PINCache-Prefix.pch', |
68 |
| - headers = glob([ |
69 |
| - 'tests/PINCache/*.h', |
70 |
| - ]), |
71 |
| - srcs = glob([ |
72 |
| - 'tests/PINCache/*.m', |
73 |
| - ]), |
74 |
| - deps = [ |
75 |
| - ':TestAppResources', |
76 |
| - ':PINCache', |
77 |
| - ], |
78 |
| - frameworks = [ |
79 |
| - '$SDKROOT/System/Library/Frameworks/UIKit.framework', |
80 |
| - '$SDKROOT/System/Library/Frameworks/Foundation.framework', |
81 |
| - ], |
82 |
| -) |
83 |
| - |
84 |
| -apple_package( |
85 |
| - name = 'TestAppPackage', |
86 |
| - bundle = ':TestApp', |
87 |
| -) |
88 |
| - |
89 |
| -apple_test( |
90 |
| - name = 'Tests', |
91 |
| - test_host_app = ':TestApp', |
92 |
| - srcs = glob([ |
93 |
| - 'tests/PINCacheTests/*.m' |
94 |
| - ]), |
95 |
| - info_plist = 'tests/PINCacheTests/PINCacheTests-Info.plist', |
96 |
| - preprocessor_flags = COMMON_PREPROCESSOR_FLAGS, |
97 | 19 | frameworks = [
|
98 | 20 | '$SDKROOT/System/Library/Frameworks/Foundation.framework',
|
99 |
| - '$SDKROOT/System/Library/Frameworks/UIKit.framework', |
100 |
| - '$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework', |
101 | 21 | ],
|
| 22 | + visibility = ['PUBLIC'], |
102 | 23 | )
|
0 commit comments