@@ -73,97 +73,200 @@ add_executable(intro examples/intro.cpp)
73
73
target_link_libraries (intro common )
74
74
target_compile_features (intro PUBLIC cxx_std_20 )
75
75
add_test (intro intro )
76
+ if (MSVC )
77
+ target_compile_options (intro PRIVATE /bigobj )
78
+ target_compile_definitions (intro PRIVATE _WIN32_WINNT=0x0601 )
79
+ endif ()
76
80
77
81
add_executable (intro_sync examples/intro_sync.cpp )
78
82
target_compile_features (intro_sync PUBLIC cxx_std_20 )
79
83
add_test (intro_sync intro_sync )
84
+ add_test (intro_sync intro_sync )
85
+ if (MSVC )
86
+ target_compile_options (intro_sync PRIVATE /bigobj )
87
+ target_compile_definitions (intro_sync PRIVATE _WIN32_WINNT=0x0601 )
88
+ endif ()
80
89
81
90
add_executable (chat_room examples/chat_room.cpp )
82
91
target_compile_features (chat_room PUBLIC cxx_std_20 )
83
92
target_link_libraries (chat_room common )
93
+ if (MSVC )
94
+ target_compile_options (chat_room PRIVATE /bigobj )
95
+ target_compile_definitions (chat_room PRIVATE _WIN32_WINNT=0x0601 )
96
+ endif ()
84
97
85
98
add_executable (containers examples/containers.cpp )
86
99
target_compile_features (containers PUBLIC cxx_std_20 )
87
100
target_link_libraries (containers common )
88
101
add_test (containers containers )
102
+ if (MSVC )
103
+ target_compile_options (containers PRIVATE /bigobj )
104
+ target_compile_definitions (containers PRIVATE _WIN32_WINNT=0x0601 )
105
+ endif ()
89
106
90
107
add_executable (echo_server examples/echo_server.cpp )
91
108
target_compile_features (echo_server PUBLIC cxx_std_20 )
92
109
target_link_libraries (echo_server common )
110
+ if (MSVC )
111
+ target_compile_options (echo_server PRIVATE /bigobj )
112
+ target_compile_definitions (echo_server PRIVATE _WIN32_WINNT=0x0601 )
113
+ endif ()
93
114
94
115
add_executable (resolve_with_sentinel examples/resolve_with_sentinel.cpp )
95
116
target_compile_features (resolve_with_sentinel PUBLIC cxx_std_20 )
96
117
target_link_libraries (resolve_with_sentinel common )
97
118
add_test (resolve_with_sentinel resolve_with_sentinel )
119
+ if (MSVC )
120
+ target_compile_options (resolve_with_sentinel PRIVATE /bigobj )
121
+ target_compile_definitions (resolve_with_sentinel PRIVATE _WIN32_WINNT=0x0601 )
122
+ endif ()
98
123
99
124
add_executable (serialization examples/serialization.cpp )
100
125
target_compile_features (serialization PUBLIC cxx_std_20 )
101
126
target_link_libraries (serialization common )
102
127
add_test (serialization serialization )
128
+ if (MSVC )
129
+ target_compile_options (serialization PRIVATE /bigobj )
130
+ target_compile_definitions (serialization PRIVATE _WIN32_WINNT=0x0601 )
131
+ endif ()
103
132
104
133
add_executable (subscriber examples/subscriber.cpp )
105
134
target_compile_features (subscriber PUBLIC cxx_std_20 )
106
135
target_link_libraries (subscriber common )
136
+ if (MSVC )
137
+ target_compile_options (subscriber PRIVATE /bigobj )
138
+ target_compile_definitions (subscriber PRIVATE _WIN32_WINNT=0x0601 )
139
+ endif ()
107
140
108
141
add_executable (intro_tls examples/intro_tls.cpp )
109
142
target_compile_features (intro_tls PUBLIC cxx_std_20 )
110
143
add_test (intro_tls intro_tls )
111
144
target_link_libraries (intro_tls OpenSSL::Crypto OpenSSL::SSL )
112
145
target_link_libraries (intro_tls common )
146
+ if (MSVC )
147
+ target_compile_options (intro_tls PRIVATE /bigobj )
148
+ target_compile_definitions (intro_tls PRIVATE _WIN32_WINNT=0x0601 )
149
+ endif ()
113
150
114
151
add_executable (low_level_async examples/low_level_async.cpp )
115
152
target_compile_features (low_level_async PUBLIC cxx_std_20 )
116
153
add_test (low_level_async low_level_async )
117
154
target_link_libraries (low_level_async common )
155
+ if (MSVC )
156
+ target_compile_options (low_level_async PRIVATE /bigobj )
157
+ target_compile_definitions (low_level_async PRIVATE _WIN32_WINNT=0x0601 )
158
+ endif ()
118
159
119
160
add_executable (echo_server_client benchmarks/cpp/asio/echo_server_client.cpp )
120
- add_executable (echo_server_direct benchmarks/cpp/asio/echo_server_direct.cpp )
121
- add_executable (low_level_sync examples/low_level_sync.cpp )
122
- add_executable (test_conn_exec tests/conn_exec.cpp )
123
- add_executable (test_conn_push tests/conn_push.cpp )
124
- add_executable (test_conn_quit tests/conn_quit.cpp )
125
- add_executable (test_conn_quit_coalesce tests/conn_quit_coalesce.cpp )
126
- add_executable (test_conn_reconnect tests/conn_reconnect.cpp )
127
- add_executable (test_conn_tls tests/conn_tls.cpp )
128
- add_executable (test_low_level tests/low_level.cpp )
129
- add_executable (test_conn_run_cancel tests/conn_run_cancel.cpp )
130
- add_executable (test_conn_exec_cancel tests/conn_exec_cancel.cpp )
131
- add_executable (test_conn_echo_stress tests/conn_echo_stress.cpp )
132
- add_executable (test_request tests/request.cpp )
133
-
134
161
target_compile_features (echo_server_client PUBLIC cxx_std_20 )
162
+ if (MSVC )
163
+ target_compile_options (echo_server_client PRIVATE /bigobj )
164
+ target_compile_definitions (echo_server_client PRIVATE _WIN32_WINNT=0x0601 )
165
+ endif ()
166
+
167
+ add_executable (echo_server_direct benchmarks/cpp/asio/echo_server_direct.cpp )
135
168
target_compile_features (echo_server_direct PUBLIC cxx_std_20 )
169
+ if (MSVC )
170
+ target_compile_options (echo_server_direct PRIVATE /bigobj )
171
+ target_compile_definitions (echo_server_direct PRIVATE _WIN32_WINNT=0x0601 )
172
+ endif ()
173
+
174
+ add_executable (low_level_sync examples/low_level_sync.cpp )
136
175
target_compile_features (low_level_sync PUBLIC cxx_std_17 )
176
+ add_test (low_level_sync low_level_sync )
177
+ if (MSVC )
178
+ target_compile_options (low_level_sync PRIVATE /bigobj )
179
+ target_compile_definitions (low_level_sync PRIVATE _WIN32_WINNT=0x0601 )
180
+ endif ()
181
+
182
+ add_executable (test_conn_exec tests/conn_exec.cpp )
137
183
target_compile_features (test_conn_exec PUBLIC cxx_std_20 )
184
+ add_test (test_conn_exec test_conn_exec )
185
+ if (MSVC )
186
+ target_compile_options (test_conn_exec PRIVATE /bigobj )
187
+ target_compile_definitions (test_conn_exec PRIVATE _WIN32_WINNT=0x0601 )
188
+ endif ()
189
+
190
+ add_executable (test_conn_push tests/conn_push.cpp )
138
191
target_compile_features (test_conn_push PUBLIC cxx_std_20 )
192
+ add_test (test_conn_push test_conn_push )
193
+ if (MSVC )
194
+ target_compile_options (test_conn_push PRIVATE /bigobj )
195
+ target_compile_definitions (test_conn_push PRIVATE _WIN32_WINNT=0x0601 )
196
+ endif ()
197
+
198
+ add_executable (test_conn_quit tests/conn_quit.cpp )
139
199
target_compile_features (test_conn_quit PUBLIC cxx_std_17 )
200
+ add_test (test_conn_quit test_conn_quit )
201
+ if (MSVC )
202
+ target_compile_options (test_conn_quit PRIVATE /bigobj )
203
+ target_compile_definitions (test_conn_quit PRIVATE _WIN32_WINNT=0x0601 )
204
+ endif ()
205
+
206
+ add_executable (test_conn_quit_coalesce tests/conn_quit_coalesce.cpp )
207
+ add_test (test_conn_quit_coalesce test_conn_quit_coalesce )
140
208
target_compile_features (test_conn_quit_coalesce PUBLIC cxx_std_17 )
209
+ if (MSVC )
210
+ target_compile_options (test_conn_quit_coalesce PRIVATE /bigobj )
211
+ target_compile_definitions (test_conn_quit_coalesce PRIVATE _WIN32_WINNT=0x0601 )
212
+ endif ()
213
+
214
+ add_executable (test_conn_reconnect tests/conn_reconnect.cpp )
141
215
target_compile_features (test_conn_reconnect PUBLIC cxx_std_20 )
142
- target_compile_features (test_conn_tls PUBLIC cxx_std_17 )
143
- target_compile_features (test_low_level PUBLIC cxx_std_17 )
144
- target_compile_features (test_conn_run_cancel PUBLIC cxx_std_20 )
145
- target_compile_features (test_conn_exec_cancel PUBLIC cxx_std_20 )
146
- target_compile_features (test_conn_echo_stress PUBLIC cxx_std_20 )
147
- target_compile_features (test_request PUBLIC cxx_std_17 )
216
+ add_test (test_conn_reconnect test_conn_reconnect )
217
+ if (MSVC )
218
+ target_compile_options (test_conn_reconnect PRIVATE /bigobj )
219
+ target_compile_definitions (test_conn_reconnect PRIVATE _WIN32_WINNT=0x0601 )
220
+ endif ()
148
221
222
+ add_executable (test_conn_tls tests/conn_tls.cpp )
223
+ add_test (test_conn_tls test_conn_tls )
224
+ target_compile_features (test_conn_tls PUBLIC cxx_std_17 )
149
225
target_link_libraries (test_conn_tls OpenSSL::Crypto OpenSSL::SSL )
226
+ if (MSVC )
227
+ target_compile_options (test_conn_tls PRIVATE /bigobj )
228
+ target_compile_definitions (test_conn_tls PRIVATE _WIN32_WINNT=0x0601 )
229
+ endif ()
150
230
151
- # Tests
152
- #=======================================================================
153
-
154
- #add_test(intro_sync intro_sync)
155
- add_test (low_level_sync low_level_sync )
231
+ add_executable (test_low_level tests/low_level.cpp )
232
+ target_compile_features (test_low_level PUBLIC cxx_std_17 )
156
233
add_test (test_low_level test_low_level )
157
- add_test (test_conn_exec test_conn_exec )
158
- add_test (test_conn_push test_conn_push )
159
- add_test (test_conn_quit test_conn_quit )
160
- add_test (test_conn_quit_coalesce test_conn_quit_coalesce )
161
- add_test (test_conn_reconnect test_conn_reconnect )
162
- add_test (test_conn_tls test_conn_tls )
234
+ if (MSVC )
235
+ target_compile_options (test_low_level PRIVATE /bigobj )
236
+ target_compile_definitions (test_low_level PRIVATE _WIN32_WINNT=0x0601 )
237
+ endif ()
238
+
239
+ add_executable (test_conn_run_cancel tests/conn_run_cancel.cpp )
240
+ target_compile_features (test_conn_run_cancel PUBLIC cxx_std_20 )
163
241
add_test (test_conn_run_cancel test_conn_run_cancel )
242
+ if (MSVC )
243
+ target_compile_options (test_conn_run_cancel PRIVATE /bigobj )
244
+ target_compile_definitions (test_conn_run_cancel PRIVATE _WIN32_WINNT=0x0601 )
245
+ endif ()
246
+
247
+ add_executable (test_conn_exec_cancel tests/conn_exec_cancel.cpp )
248
+ target_compile_features (test_conn_exec_cancel PUBLIC cxx_std_20 )
164
249
add_test (test_conn_exec_cancel test_conn_exec_cancel )
250
+ if (MSVC )
251
+ target_compile_options (test_conn_exec_cancel PRIVATE /bigobj )
252
+ target_compile_definitions (test_conn_exec_cancel PRIVATE _WIN32_WINNT=0x0601 )
253
+ endif ()
254
+
255
+ add_executable (test_conn_echo_stress tests/conn_echo_stress.cpp )
256
+ target_compile_features (test_conn_echo_stress PUBLIC cxx_std_20 )
165
257
add_test (test_conn_echo_stress test_conn_echo_stress )
258
+ if (MSVC )
259
+ target_compile_options (test_conn_echo_stress PRIVATE /bigobj )
260
+ target_compile_definitions (test_conn_echo_stress PRIVATE _WIN32_WINNT=0x0601 )
261
+ endif ()
262
+
263
+ add_executable (test_request tests/request.cpp )
264
+ target_compile_features (test_request PUBLIC cxx_std_17 )
166
265
add_test (test_request test_request )
266
+ if (MSVC )
267
+ target_compile_options (test_request PRIVATE /bigobj )
268
+ target_compile_definitions (test_request PRIVATE _WIN32_WINNT=0x0601 )
269
+ endif ()
167
270
168
271
# Install
169
272
#=======================================================================
0 commit comments