forked from google/s2geometry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
561 lines (532 loc) · 20.9 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
cmake_minimum_required(VERSION 3.12)
project(s2-geometry
VERSION 0.10.0)
include(CMakeDependentOption)
include(CheckCXXCompilerFlag)
include(FeatureSummary)
include(FindPackageHandleStandardArgs)
include(GNUInstallDirs)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Avoid "Policy CMP0042 is not set" warning on macOS.
if (APPLE)
set(CMAKE_MACOSX_RPATH TRUE)
endif()
# s2geometry needs to use the same C++ standard that absl used to avoid
# undefined symbol errors since ABSL_HAVE_STD_STRING_VIEW etc will
# end up defined differently. There is probably a better way to achieve
# this than assuming what absl used. s2geometry should actually work fine
# with C++11, but there are a few places that use std::exchange instead of
# absl::exchange, is_x_t, and some atomic constructors that would need
# to change. File a bug if you need support for earlier versions.
# TODO(jrosenstock,b/205952836): Use absl functions if possible.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# No compiler-specific extensions, i.e. -std=c++17, not -std=gnu++17.
set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/third_party/cmake")
option(WITH_GFLAGS "Use gflags to change command line flags." OFF)
add_feature_info(GFLAGS WITH_GFLAGS
"allows changing command line flags.")
# glog option can only be turned on if gflags is on.
cmake_dependent_option(WITH_GLOG "Use glog for logging." ON
"WITH_GFLAGS" OFF)
add_feature_info(GLOG WITH_GLOG "provides logging configurability.")
option(BUILD_SHARED_LIBS "Build shared libraries instead of static." ON)
add_feature_info(SHARED_LIBS BUILD_SHARED_LIBS
"builds shared libraries instead of static.")
option(BUILD_EXAMPLES "Build s2 documentation examples." ON)
option(WITH_PYTHON "Add python interface" OFF)
add_feature_info(PYTHON WITH_PYTHON "provides python interface to S2")
feature_summary(WHAT ALL)
if (WITH_GLOG)
find_package(Glog REQUIRED)
# FindGFlags.cmake and FindGlog.cmake do not seem to implement REQUIRED;
# check manually.
if (NOT ${GLOG_FOUND})
message(FATAL_ERROR "Glog requested but not found")
endif()
add_definitions(-DS2_USE_GLOG)
else()
# Don't output anything for LOG(INFO).
add_definitions(-DABSL_MIN_LOG_LEVEL=1)
endif()
if (WITH_GFLAGS)
find_package(GFlags REQUIRED)
if (NOT ${GFLAGS_FOUND})
message(FATAL_ERROR "GFlags requested but not found")
endif()
add_definitions(-DS2_USE_GFLAGS)
endif()
find_package(absl REQUIRED)
find_package(OpenSSL REQUIRED)
# pthreads isn't used directly, but this is still required for std::thread.
find_package(Threads REQUIRED)
if (WITH_PYTHON)
# Should be easy to make it work with swig3, but some args to %pythonprepend
# seem to be different and were changed.
find_package(SWIG 4.0)
# Use Python3_ROOT_DIR to help find python3, if the correct location is not
# being found by default.
find_package(Python3 COMPONENTS Interpreter Development)
endif()
if (WIN32)
# Use unsigned characters
add_definitions(-J)
# Make sure cmath header defines things like M_PI
add_definitions(-D_USE_MATH_DEFINES)
# Make sure Windows doesn't define min/max macros that interfere with STL
add_definitions(-DNOMINMAX)
else()
# Avoid megabytes of warnings like:
# util/math/vector.h:178:16: warning: optimization attribute on
# ‘double sqrt(double)’ follows definition but the attribute doesn’t
# match [-Wattributes]
add_definitions(-Wno-attributes)
add_definitions(-Wno-deprecated-declarations)
endif()
# If OpenSSL is installed in a non-standard location, configure with
# something like:
# OPENSSL_ROOT_DIR=/usr/local/opt/openssl cmake ..
include_directories(
${GFLAGS_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
if (WITH_PYTHON)
include_directories(${Python3_INCLUDE_DIRS})
endif()
include_directories(src)
add_library(s2
src/s2/encoded_s2cell_id_vector.cc
src/s2/encoded_s2point_vector.cc
src/s2/encoded_s2shape_index.cc
src/s2/encoded_string_vector.cc
src/s2/id_set_lexicon.cc
src/s2/mutable_s2shape_index.cc
src/s2/r2rect.cc
src/s2/s1angle.cc
src/s2/s1chord_angle.cc
src/s2/s1interval.cc
src/s2/s2boolean_operation.cc
src/s2/s2buffer_operation.cc
src/s2/s2builder.cc
src/s2/s2builder_graph.cc
src/s2/s2builderutil_closed_set_normalizer.cc
src/s2/s2builderutil_find_polygon_degeneracies.cc
src/s2/s2builderutil_get_snapped_winding_delta.cc
src/s2/s2builderutil_lax_polygon_layer.cc
src/s2/s2builderutil_lax_polyline_layer.cc
src/s2/s2builderutil_s2point_vector_layer.cc
src/s2/s2builderutil_s2polygon_layer.cc
src/s2/s2builderutil_s2polyline_layer.cc
src/s2/s2builderutil_s2polyline_vector_layer.cc
src/s2/s2builderutil_snap_functions.cc
src/s2/s2cap.cc
src/s2/s2cell.cc
src/s2/s2cell_id.cc
src/s2/s2cell_index.cc
src/s2/s2cell_union.cc
src/s2/s2centroids.cc
src/s2/s2closest_cell_query.cc
src/s2/s2closest_edge_query.cc
src/s2/s2closest_point_query.cc
src/s2/s2contains_vertex_query.cc
src/s2/s2convex_hull_query.cc
src/s2/s2coords.cc
src/s2/s2crossing_edge_query.cc
src/s2/s2debug.cc
src/s2/s2earth.cc
src/s2/s2edge_clipping.cc
src/s2/s2edge_crosser.cc
src/s2/s2edge_crossings.cc
src/s2/s2edge_distances.cc
src/s2/s2edge_tessellator.cc
src/s2/s2furthest_edge_query.cc
src/s2/s2latlng.cc
src/s2/s2latlng_rect.cc
src/s2/s2latlng_rect_bounder.cc
src/s2/s2lax_loop_shape.cc
src/s2/s2lax_polygon_shape.cc
src/s2/s2lax_polyline_shape.cc
src/s2/s2loop.cc
src/s2/s2loop_measures.cc
src/s2/s2measures.cc
src/s2/s2memory_tracker.cc
src/s2/s2metrics.cc
src/s2/s2max_distance_targets.cc
src/s2/s2min_distance_targets.cc
src/s2/s2padded_cell.cc
src/s2/s2point_compression.cc
src/s2/s2point_region.cc
src/s2/s2pointutil.cc
src/s2/s2polygon.cc
src/s2/s2polyline.cc
src/s2/s2polyline_alignment.cc
src/s2/s2polyline_measures.cc
src/s2/s2polyline_simplifier.cc
src/s2/s2predicates.cc
src/s2/s2projections.cc
src/s2/s2r2rect.cc
src/s2/s2region.cc
src/s2/s2region_term_indexer.cc
src/s2/s2region_coverer.cc
src/s2/s2region_intersection.cc
src/s2/s2region_union.cc
src/s2/s2shape_index.cc
src/s2/s2shape_index_buffered_region.cc
src/s2/s2shape_index_measures.cc
src/s2/s2shape_measures.cc
src/s2/s2shapeutil_build_polygon_boundaries.cc
src/s2/s2shapeutil_coding.cc
src/s2/s2shapeutil_contains_brute_force.cc
src/s2/s2shapeutil_conversion.cc
src/s2/s2shapeutil_edge_iterator.cc
src/s2/s2shapeutil_get_reference_point.cc
src/s2/s2shapeutil_range_iterator.cc
src/s2/s2shapeutil_visit_crossing_edge_pairs.cc
src/s2/s2text_format.cc
src/s2/s2wedge_relations.cc
src/s2/s2winding_operation.cc
src/s2/strings/serialize.cc
src/s2/util/bits/bit-interleave.cc
src/s2/util/bits/bits.cc
src/s2/util/coding/coder.cc
src/s2/util/coding/varint.cc
src/s2/util/math/exactfloat/exactfloat.cc
src/s2/util/math/mathutil.cc
src/s2/util/units/length-units.cc)
add_library(s2testing STATIC
src/s2/s2builderutil_testing.cc
src/s2/s2shapeutil_testing.cc
src/s2/s2testing.cc
src/s2/thread_testing.cc)
target_link_libraries(
s2
${GFLAGS_LIBRARIES} ${GLOG_LIBRARIES} ${OPENSSL_LIBRARIES}
absl::base
absl::btree
absl::config
absl::core_headers
absl::dynamic_annotations
absl::endian
absl::fixed_array
absl::flat_hash_map
absl::flat_hash_set
absl::hash
absl::inlined_vector
absl::int128
absl::log_severity
absl::memory
absl::span
absl::str_format
absl::strings
absl::type_traits
absl::utility
${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(
s2testing
${GFLAGS_LIBRARIES} ${GLOG_LIBRARIES}
absl::memory
absl::strings)
# Allow other CMake projects to use this one with:
# list(APPEND CMAKE_MODULE_PATH "<path_to_s2geometry_dir>/third_party/cmake")
# add_subdirectory(<path_to_s2geometry_dir> s2geometry)
# target_link_libraries(<target_name> s2)
target_include_directories(s2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
# Add version information to the target
set_target_properties(s2 PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION})
# We don't need to install all headers, only those
# transitively included by s2 headers we are exporting.
install(FILES src/s2/_fp_contract_off.h
src/s2/encoded_s2cell_id_vector.h
src/s2/encoded_s2point_vector.h
src/s2/encoded_s2shape_index.h
src/s2/encoded_string_vector.h
src/s2/encoded_uint_vector.h
src/s2/id_set_lexicon.h
src/s2/mutable_s2shape_index.h
src/s2/r1interval.h
src/s2/r2.h
src/s2/r2rect.h
src/s2/s1angle.h
src/s2/s1chord_angle.h
src/s2/s1interval.h
src/s2/s2boolean_operation.h
src/s2/s2buffer_operation.h
src/s2/s2builder.h
src/s2/s2builder_graph.h
src/s2/s2builder_layer.h
src/s2/s2builderutil_closed_set_normalizer.h
src/s2/s2builderutil_find_polygon_degeneracies.h
src/s2/s2builderutil_get_snapped_winding_delta.h
src/s2/s2builderutil_graph_shape.h
src/s2/s2builderutil_lax_polygon_layer.h
src/s2/s2builderutil_lax_polyline_layer.h
src/s2/s2builderutil_s2point_vector_layer.h
src/s2/s2builderutil_s2polygon_layer.h
src/s2/s2builderutil_s2polyline_layer.h
src/s2/s2builderutil_s2polyline_vector_layer.h
src/s2/s2builderutil_snap_functions.h
src/s2/s2builderutil_testing.h
src/s2/s2cap.h
src/s2/s2cell.h
src/s2/s2cell_id.h
src/s2/s2cell_index.h
src/s2/s2cell_union.h
src/s2/s2centroids.h
src/s2/s2closest_cell_query.h
src/s2/s2closest_cell_query_base.h
src/s2/s2closest_edge_query.h
src/s2/s2closest_edge_query_base.h
src/s2/s2closest_point_query.h
src/s2/s2closest_point_query_base.h
src/s2/s2contains_point_query.h
src/s2/s2contains_vertex_query.h
src/s2/s2convex_hull_query.h
src/s2/s2coords_internal.h
src/s2/s2coords.h
src/s2/s2crossing_edge_query.h
src/s2/s2debug.h
src/s2/s2distance_target.h
src/s2/s2earth.h
src/s2/s2edge_clipping.h
src/s2/s2edge_crosser.h
src/s2/s2edge_crossings.h
src/s2/s2edge_crossings_internal.h
src/s2/s2edge_distances.h
src/s2/s2edge_tessellator.h
src/s2/s2edge_vector_shape.h
src/s2/s2error.h
src/s2/s2furthest_edge_query.h
src/s2/s2latlng.h
src/s2/s2latlng_rect.h
src/s2/s2latlng_rect_bounder.h
src/s2/s2lax_loop_shape.h
src/s2/s2lax_polygon_shape.h
src/s2/s2lax_polyline_shape.h
src/s2/s2loop.h
src/s2/s2loop_measures.h
src/s2/s2measures.h
src/s2/s2memory_tracker.h
src/s2/s2metrics.h
src/s2/s2max_distance_targets.h
src/s2/s2min_distance_targets.h
src/s2/s2padded_cell.h
src/s2/s2point.h
src/s2/s2point_vector_shape.h
src/s2/s2point_compression.h
src/s2/s2point_index.h
src/s2/s2point_region.h
src/s2/s2point_span.h
src/s2/s2pointutil.h
src/s2/s2polygon.h
src/s2/s2polyline.h
src/s2/s2polyline_alignment.h
src/s2/s2polyline_measures.h
src/s2/s2polyline_simplifier.h
src/s2/s2predicates.h
src/s2/s2predicates_internal.h
src/s2/s2projections.h
src/s2/s2r2rect.h
src/s2/s2region.h
src/s2/s2region_term_indexer.h
src/s2/s2region_coverer.h
src/s2/s2region_intersection.h
src/s2/s2region_union.h
src/s2/s2shape.h
src/s2/s2shape_index.h
src/s2/s2shape_index_buffered_region.h
src/s2/s2shape_index_region.h
src/s2/s2shape_measures.h
src/s2/s2shapeutil_build_polygon_boundaries.h
src/s2/s2shapeutil_coding.h
src/s2/s2shapeutil_contains_brute_force.h
src/s2/s2shapeutil_conversion.h
src/s2/s2shapeutil_count_edges.h
src/s2/s2shapeutil_edge_iterator.h
src/s2/s2shapeutil_get_reference_point.h
src/s2/s2shapeutil_range_iterator.h
src/s2/s2shapeutil_shape_edge.h
src/s2/s2shapeutil_shape_edge_id.h
src/s2/s2shapeutil_testing.h
src/s2/s2shapeutil_visit_crossing_edge_pairs.h
src/s2/s2testing.h
src/s2/s2text_format.h
src/s2/s2wedge_relations.h
src/s2/s2winding_operation.h
src/s2/s2wrapped_shape.h
src/s2/sequence_lexicon.h
src/s2/thread_testing.h
src/s2/value_lexicon.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2")
install(FILES src/s2/base/casts.h
src/s2/base/commandlineflags.h
src/s2/base/integral_types.h
src/s2/base/log_severity.h
src/s2/base/logging.h
src/s2/base/port.h
src/s2/base/spinlock.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/base")
install(FILES src/s2/util/bits/bits.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/bits")
install(FILES src/s2/util/coding/coder.h
src/s2/util/coding/varint.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/coding")
install(FILES src/s2/util/endian/endian.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/endian")
install(FILES src/s2/util/gtl/compact_array.h
src/s2/util/gtl/container_logging.h
src/s2/util/gtl/dense_hash_set.h
src/s2/util/gtl/densehashtable.h
src/s2/util/gtl/hashtable_common.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/gtl")
install(FILES src/s2/util/hash/mix.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/hash")
install(FILES src/s2/util/math/mathutil.h
src/s2/util/math/matrix3x3.h
src/s2/util/math/vector.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/math")
install(FILES src/s2/util/math/exactfloat/exactfloat.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/math/exactfloat")
install(FILES src/s2/util/units/length-units.h
src/s2/util/units/physical-units.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/s2/util/units")
install(TARGETS s2 s2testing
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
message("GTEST_ROOT: ${GTEST_ROOT}")
if (GTEST_ROOT)
add_subdirectory(${GTEST_ROOT} build_gtest)
include_directories(${GTEST_ROOT}/include)
set(S2TestFiles
src/s2/encoded_s2cell_id_vector_test.cc
src/s2/encoded_s2point_vector_test.cc
src/s2/encoded_s2shape_index_test.cc
src/s2/encoded_string_vector_test.cc
src/s2/encoded_uint_vector_test.cc
src/s2/id_set_lexicon_test.cc
src/s2/mutable_s2shape_index_test.cc
src/s2/r1interval_test.cc
src/s2/r2rect_test.cc
src/s2/s1angle_test.cc
src/s2/s1chord_angle_test.cc
src/s2/s1interval_test.cc
src/s2/s2boolean_operation_test.cc
src/s2/s2buffer_operation_test.cc
src/s2/s2builder_graph_test.cc
src/s2/s2builder_test.cc
src/s2/s2builderutil_closed_set_normalizer_test.cc
src/s2/s2builderutil_find_polygon_degeneracies_test.cc
src/s2/s2builderutil_get_snapped_winding_delta_test.cc
src/s2/s2builderutil_lax_polygon_layer_test.cc
src/s2/s2builderutil_lax_polyline_layer_test.cc
src/s2/s2builderutil_s2point_vector_layer_test.cc
src/s2/s2builderutil_s2polygon_layer_test.cc
src/s2/s2builderutil_s2polyline_layer_test.cc
src/s2/s2builderutil_s2polyline_vector_layer_test.cc
src/s2/s2builderutil_snap_functions_test.cc
src/s2/s2builderutil_testing_test.cc
src/s2/s2cap_test.cc
src/s2/s2cell_test.cc
src/s2/s2cell_id_test.cc
src/s2/s2cell_index_test.cc
src/s2/s2cell_union_test.cc
src/s2/s2centroids_test.cc
src/s2/s2closest_cell_query_base_test.cc
src/s2/s2closest_cell_query_test.cc
src/s2/s2closest_edge_query_base_test.cc
src/s2/s2closest_edge_query_test.cc
src/s2/s2closest_point_query_base_test.cc
src/s2/s2closest_point_query_test.cc
src/s2/s2contains_point_query_test.cc
src/s2/s2contains_vertex_query_test.cc
src/s2/s2convex_hull_query_test.cc
src/s2/s2coords_test.cc
src/s2/s2crossing_edge_query_test.cc
src/s2/s2earth_test.cc
src/s2/s2edge_clipping_test.cc
src/s2/s2edge_crosser_test.cc
src/s2/s2edge_crossings_test.cc
src/s2/s2edge_distances_test.cc
src/s2/s2edge_tessellator_test.cc
src/s2/s2edge_vector_shape_test.cc
src/s2/s2error_test.cc
src/s2/s2furthest_edge_query_test.cc
src/s2/s2latlng_test.cc
src/s2/s2latlng_rect_bounder_test.cc
src/s2/s2latlng_rect_test.cc
src/s2/s2lax_loop_shape_test.cc
src/s2/s2lax_polygon_shape_test.cc
src/s2/s2lax_polyline_shape_test.cc
src/s2/s2loop_measures_test.cc
src/s2/s2loop_test.cc
src/s2/s2measures_test.cc
src/s2/s2memory_tracker_test.cc
src/s2/s2metrics_test.cc
src/s2/s2max_distance_targets_test.cc
src/s2/s2min_distance_targets_test.cc
src/s2/s2padded_cell_test.cc
src/s2/s2point_test.cc
src/s2/s2point_vector_shape_test.cc
src/s2/s2point_compression_test.cc
src/s2/s2point_index_test.cc
src/s2/s2point_region_test.cc
src/s2/s2pointutil_test.cc
src/s2/s2polygon_test.cc
src/s2/s2polyline_alignment_test.cc
src/s2/s2polyline_simplifier_test.cc
src/s2/s2polyline_measures_test.cc
src/s2/s2polyline_test.cc
src/s2/s2predicates_test.cc
src/s2/s2projections_test.cc
src/s2/s2r2rect_test.cc
src/s2/s2region_test.cc
src/s2/s2region_term_indexer_test.cc
src/s2/s2region_coverer_test.cc
src/s2/s2region_union_test.cc
src/s2/s2shape_index_buffered_region_test.cc
src/s2/s2shape_index_measures_test.cc
src/s2/s2shape_index_region_test.cc
src/s2/s2shape_index_test.cc
src/s2/s2shape_measures_test.cc
src/s2/s2shapeutil_build_polygon_boundaries_test.cc
src/s2/s2shapeutil_coding_test.cc
src/s2/s2shapeutil_contains_brute_force_test.cc
src/s2/s2shapeutil_conversion_test.cc
src/s2/s2shapeutil_count_edges_test.cc
src/s2/s2shapeutil_edge_iterator_test.cc
src/s2/s2shapeutil_get_reference_point_test.cc
src/s2/s2shapeutil_range_iterator_test.cc
src/s2/s2shapeutil_visit_crossing_edge_pairs_test.cc
src/s2/s2testing_test.cc
src/s2/s2text_format_test.cc
src/s2/s2wedge_relations_test.cc
src/s2/s2winding_operation_test.cc
src/s2/s2wrapped_shape_test.cc
src/s2/sequence_lexicon_test.cc
src/s2/value_lexicon_test.cc)
enable_testing()
foreach (test_cc ${S2TestFiles})
get_filename_component(test ${test_cc} NAME_WE)
add_executable(${test} ${test_cc})
target_link_libraries(
${test}
s2testing s2
absl::base
absl::btree
absl::core_headers
absl::flags_reflection
absl::memory
absl::span
absl::strings
absl::synchronization
gtest_main)
add_test(${test} ${test})
endforeach()
endif()
if (BUILD_EXAMPLES)
add_subdirectory("doc/examples" examples)
endif()
if (${SWIG_FOUND} AND ${Python3_FOUND})
add_subdirectory("src/python" python)
endif()