|
3 | 3 | # This source code is licensed under the MIT license found in the |
4 | 4 | # LICENSE file in the root directory of this source tree. |
5 | 5 |
|
6 | | -cmake_minimum_required(VERSION 3.10.1) |
| 6 | +cmake_minimum_required(VERSION 3.16) |
7 | 7 | project(game) |
8 | 8 |
|
9 | 9 | set(CMAKE_CXX_STANDARD 20) |
10 | 10 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 11 | +add_library(range_v3 INTERFACE IMPORTED) |
| 12 | +set_target_properties(range_v3 PROPERTIES |
| 13 | + INTERFACE_INCLUDE_DIRECTORIES /root/build/range-v3/include) |
| 14 | +find_program(CMAKE_CXX_COMPILER clang++ PATHS CACHE STRING "C++ compiler" FORCE) |
| 15 | + |
11 | 16 | # Don't compile with AVX512 instructions since many of the AWS |
12 | 17 | # instances won't have access to that instruction set. |
13 | 18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mno-avx512f -march=haswell") |
14 | | -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-avx512f -march=haswell") |
| 19 | +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-avx512f -march=haswell -fcoroutines-ts") |
15 | 20 |
|
16 | 21 | include("common.cmake") |
17 | 22 | include("perf_tools.cmake") |
18 | 23 |
|
19 | | -# lift |
20 | | -add_executable( |
21 | | - lift_calculator |
22 | | - "fbpcs/emp_games/lift/calculator/main.cpp" |
23 | | - "fbpcs/emp_games/lift/calculator/OutputMetrics.hpp" |
24 | | - "fbpcs/emp_games/lift/common/GroupedLiftMetrics.h" |
25 | | - "fbpcs/emp_games/lift/common/GroupedLiftMetrics.cpp" |
26 | | - "fbpcs/emp_games/lift/common/LiftMetrics.h" |
27 | | - "fbpcs/emp_games/lift/common/LiftMetrics.cpp" |
28 | | - "fbpcs/emp_games/lift/calculator/CalculatorApp.h" |
29 | | - "fbpcs/emp_games/lift/calculator/CalculatorApp.cpp" |
30 | | - "fbpcs/emp_games/lift/calculator/CalculatorGame.h" |
31 | | - "fbpcs/emp_games/lift/calculator/OutputMetrics.h" |
32 | | - "fbpcs/emp_games/lift/calculator/InputData.cpp" |
33 | | - "fbpcs/emp_games/lift/calculator/InputData.h" |
34 | | - "fbpcs/emp_games/lift/calculator/CalculatorGameConfig.h" |
35 | | - "fbpcs/emp_games/lift/calculator/OutputMetricsData.h" |
36 | | - "fbpcs/emp_games/common/PrivateData.h" |
37 | | - "fbpcs/emp_games/common/SecretSharing.h" |
38 | | - "fbpcs/emp_games/common/EmpOperationUtil.h" |
39 | | - "fbpcs/emp_games/common/Csv.h" |
40 | | - "fbpcs/emp_games/common/Csv.cpp") |
41 | | -target_link_libraries( |
42 | | - lift_calculator |
43 | | - empgamecommon) |
44 | | -install(TARGETS lift_calculator DESTINATION bin) |
45 | | - |
46 | | -# generic shard_aggregator |
47 | | -file(GLOB shard_aggregator_src |
48 | | - "fbpcs/emp_games/attribution/shard_aggregator/AggMetrics.cpp", |
49 | | - "fbpcs/emp_games/attribution/shard_aggregator/AggMetricsThresholdCheckers.cpp", |
50 | | - "fbpcs/emp_games/attribution/shard_aggregator/ShardAggregatorApp.cpp", |
51 | | - "fbpcs/emp_games/attribution/shard_aggregator/ShardAggregatorValidation.cpp", |
52 | | - "fbpcs/emp_games/attribution/shard_aggregator/main.cpp" |
53 | | - "fbpcs/emp_games/attribution/Aggregator.h" |
54 | | - "fbpcs/emp_games/attribution/AttributionMetrics.h" |
55 | | - "fbpcs/emp_games/attribution/AttributionRule.h" |
56 | | - "fbpcs/emp_games/attribution/Constants.h" |
57 | | - "fbpcs/emp_games/attribution/Conversion.h" |
58 | | - "fbpcs/emp_games/attribution/Debug.h" |
59 | | - "fbpcs/emp_games/attribution/Touchpoint.h", |
60 | | - "fbpcs/emp_games/attribution/shard_aggregator/MainUtil.h", |
61 | | - "fbpcs/emp_games/attribution/shard_aggregator/ShardAggregatorGame.h") |
62 | | -add_executable( |
63 | | - shard_aggregator |
64 | | - ${shard_aggregator_src}) |
65 | | -target_link_libraries( |
66 | | - shard_aggregator |
67 | | - empgamecommon |
68 | | - perftools) |
69 | | -install(TARGETS shard_aggregator DESTINATION bin) |
70 | | - |
71 | | -# decoupled_attribution |
72 | | -file(GLOB decoupled_attribution_src |
73 | | - "fbpcs/emp_games/attribution/decoupled_attribution/**.c" |
74 | | - "fbpcs/emp_games/attribution/decoupled_attribution/**.cpp" |
75 | | - "fbpcs/emp_games/attribution/decoupled_attribution/**.h" |
76 | | - "fbpcs/emp_games/attribution/decoupled_attribution/**.hpp") |
77 | | -list(FILTER decoupled_attribution_src EXCLUDE REGEX ".*Test.*") |
78 | | -add_executable( |
79 | | - decoupled_attribution_calculator |
80 | | - ${decoupled_attribution_src}) |
81 | | -target_link_libraries( |
82 | | - decoupled_attribution_calculator |
83 | | - empgamecommon |
84 | | - perftools) |
85 | | -install(TARGETS decoupled_attribution_calculator DESTINATION bin) |
86 | | - |
87 | | -# decoupled_aggregation |
88 | | -file(GLOB decoupled_aggregation_src |
89 | | - "fbpcs/emp_games/attribution/decoupled_aggregation/**.c" |
90 | | - "fbpcs/emp_games/attribution/decoupled_aggregation/**.cpp" |
91 | | - "fbpcs/emp_games/attribution/decoupled_aggregation/**.h" |
92 | | - "fbpcs/emp_games/attribution/decoupled_aggregation/metadata/**.h" |
93 | | - "fbpcs/emp_games/attribution/decoupled_aggregation/**.hpp") |
94 | | -list(FILTER decoupled_aggregation_src EXCLUDE REGEX ".*Test.*") |
95 | | -add_executable( |
96 | | - decoupled_aggregation_calculator |
97 | | - ${decoupled_aggregation_src}) |
98 | | -target_link_libraries( |
99 | | - decoupled_aggregation_calculator |
100 | | - empgamecommon |
101 | | - perftools) |
102 | | -install(TARGETS decoupled_aggregation_calculator DESTINATION bin) |
103 | | - |
104 | | - |
105 | | -# Find boost |
106 | | -find_package(Boost REQUIRED) |
107 | | -include_directories(${Boost_INCLUDE_DIRS}) |
108 | | - |
109 | | -# pcf2_attribution |
110 | | -file(GLOB pcf2_attribution_src |
111 | | - "fbpcs/emp_games/pcf2_attribution/**.c" |
112 | | - "fbpcs/emp_games/pcf2_attribution/**.cpp" |
113 | | - "fbpcs/emp_games/pcf2_attribution/**.h" |
114 | | - "fbpcs/emp_games/pcf2_attribution/**.hpp") |
115 | | -list(FILTER pcf2_attribution_src EXCLUDE REGEX ".*Test.*") |
116 | | -add_executable( |
117 | | - pcf2_attribution_calculator |
118 | | - ${pcf2_attribution_src}) |
119 | | -target_link_libraries( |
120 | | - pcf2_attribution_calculator |
121 | | - empgamecommon |
122 | | - perftools) |
123 | | -install(TARGETS pcf2_attribution_calculator DESTINATION bin) |
124 | | - |
125 | | -# pcf2_aggregation |
126 | | -file(GLOB pcf2_aggregation_src |
127 | | - "fbpcs/emp_games/pcf2_aggregation/**.c" |
128 | | - "fbpcs/emp_games/pcf2_aggregation/**.cpp" |
129 | | - "fbpcs/emp_games/pcf2_aggregation/**.h" |
130 | | - "fbpcs/emp_games/pcf2_aggregation/**.hpp") |
131 | | -list(FILTER pcf2_aggregation_src EXCLUDE REGEX ".*Test.*") |
132 | | -add_executable( |
133 | | - pcf2_aggregation_calculator |
134 | | - ${pcf2_aggregation_src}) |
135 | | -target_link_libraries( |
136 | | - pcf2_aggregation_calculator |
137 | | - empgamecommon |
138 | | - perftools) |
139 | | -install(TARGETS pcf2_aggregation_calculator DESTINATION bin) |
| 24 | +message(STATUS "CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}") |
| 25 | +message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") |
| 26 | +message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") |
| 27 | +message(STATUS "CMAKE_LINKER: ${CMAKE_LINKER}") |
140 | 28 |
|
141 | | -# pcf2_lift metadata compaction |
142 | | -file(GLOB pcf2_lift_metadata_compaction_src |
143 | | - "fbpcs/emp_games/lift/metadata_compaction/**.cpp" |
144 | | - "fbpcs/emp_games/lift/metadata_compaction/**.h") |
145 | | -list(FILTER pcf2_lift_metadata_compaction_src EXCLUDE REGEX ".*Test.*") |
| 29 | +# pcf2_udp encryption |
| 30 | +file(GLOB udp_encryptor_src |
| 31 | + "fbpcs/emp_games/data_processing/unified_data_process/UdpEncryptor/**.cpp" |
| 32 | + "fbpcs/emp_games/data_processing/unified_data_process/UdpEncryptor/**.h") |
| 33 | +list(FILTER udp_encryptor_src EXCLUDE REGEX ".*Test.*") |
146 | 34 | add_executable( |
147 | | - pcf2_lift_metadata_compaction |
148 | | - ${pcf2_lift_metadata_compaction_src}) |
| 35 | + udp_encryptor |
| 36 | + ${udp_encryptor_src}) |
149 | 37 | target_link_libraries( |
150 | | - pcf2_lift_metadata_compaction |
| 38 | + udp_encryptor |
151 | 39 | empgamecommon |
152 | 40 | perftools |
153 | | - pcf2_lift_input_processing |
| 41 | + ${FOLLY_LIBRARIES} |
154 | 42 | ${Boost_LIBRARIES} |
| 43 | + range_v3 |
155 | 44 | ) |
156 | | -install(TARGETS pcf2_lift_metadata_compaction DESTINATION bin) |
157 | | - |
158 | | -# pcf2_lift |
159 | | -file(GLOB pcf2_lift_calculator_src |
160 | | - "fbpcs/emp_games/lift/common/**.cpp" |
161 | | - "fbpcs/emp_games/lift/common/**.h" |
162 | | - "fbpcs/emp_games/lift/pcf2_calculator/**.cpp" |
163 | | - "fbpcs/emp_games/lift/pcf2_calculator/**.h") |
164 | | -list(FILTER pcf2_lift_calculator_src EXCLUDE REGEX ".*Test.*") |
165 | | -add_executable( |
166 | | - pcf2_lift_calculator |
167 | | - ${pcf2_lift_calculator_src}) |
168 | | -target_link_libraries( |
169 | | - pcf2_lift_calculator |
170 | | - empgamecommon |
171 | | - perftools |
172 | | - pcf2_lift_input_processing) |
173 | | -install(TARGETS pcf2_lift_calculator DESTINATION bin) |
174 | | - |
175 | | -# pcf2_shard_combiner |
176 | | -file(GLOB pcf2_shard_combiner_src |
177 | | - "fbpcs/emp_games/pcf2_shard_combiner/**.cpp" |
178 | | - "fbpcs/emp_games/pcf2_shard_combiner/**.h" |
179 | | - "fbpcs/emp_games/pcf2_shard_combiner/util/**.h") |
180 | | -list(FILTER pcf2_shard_combiner_src EXCLUDE REGEX ".*Test.*") |
181 | | -add_executable( |
182 | | - pcf2_shard_combiner |
183 | | - ${pcf2_shard_combiner_src}) |
184 | | -target_link_libraries( |
185 | | - pcf2_shard_combiner |
186 | | - empgamecommon |
187 | | - perftools) |
188 | | -install(TARGETS pcf2_shard_combiner DESTINATION bin) |
189 | | - |
190 | | -# private_id_dfca_aggregator |
191 | | -file(GLOB private_id_dfca_aggregator_src |
192 | | - "fbpcs/emp_games/private_id_dfca_aggregator/**.cpp" |
193 | | - "fbpcs/emp_games/private_id_dfca_aggregator/**.h" |
194 | | - "fbpcs/emp_games/private_id_dfca_aggregator/util/**.h") |
195 | | -list(FILTER private_id_dfca_aggregator_src EXCLUDE REGEX ".*Test.*") |
196 | | -add_executable( |
197 | | - private_id_dfca_aggregator |
198 | | - ${private_id_dfca_aggregator_src}) |
199 | | -target_link_libraries( |
200 | | - private_id_dfca_aggregator |
201 | | - empgamecommon |
202 | | - perftools) |
203 | | -install(TARGETS private_id_dfca_aggregator DESTINATION bin) |
| 45 | +install(TARGETS udp_encryptor DESTINATION bin) |
0 commit comments