Skip to content

Commit f79c017

Browse files
authored
Update to 2025-12-24 google3 version (#506)
* Add copy constructors and copy assignment for S2Region derived classes * S2LatLngRect: Fix GetCapBound for tall and wide rects (>90 and >180 deg) * Avoid unnecessary zero-initialization of S2Point arrays in S2Loop, S2Polyline, S2LaxPolygonShape, S2LaxPolylineShape, and S2LaxLoopShape. * s2text_format: Return absl::StatusOr, deprecate old bool/OrDie functions * Add CTAD deduction guides for S2ContainsPointQuery and S2ClosestEdgeQuery * Deprecate MakeS2ContainsPointQuery and Make S2ClosestCellQuery functions * Release benchmarks * When using CMake, the benchmark and googletest libraries will be downloaded if tests are enabled. GOOGLETEST_ROOT is no longer used. * Switch tests to gtest_discover_tests for fine-grained progress * EncodedStringVector: Make safety check lazy * Add gmock matchers for testing all fields of S2Polyline, S2Polygon, and S2Loop. * Use <=> operator for S1Angle, S1ChordAngle, S2Cell, and S2CellId comparisons * S2CellId: Remove ABSL_ATTRIBUTE_PACKED
2 parents fd727eb + c9a7cfb commit f79c017

File tree

175 files changed

+9544
-1781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+9544
-1781
lines changed

CMakeLists.txt

Lines changed: 219 additions & 188 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ This issue may require revision of boringssl or exactfloat.
6060
[`20250814`](https://github.com/abseil/abseil-cpp/releases/tag/20250814.1)
6161
(standard library extensions). This exact version must be used.
6262
* [OpenSSL](https://github.com/openssl/openssl) (for its bignum library)
63-
* [googletest testing framework >= 1.10](https://github.com/google/googletest)
64-
(to build tests and example programs, optional)
6563

6664
On Ubuntu, all of these other than abseil can be installed via apt-get:
6765

6866
```
69-
sudo apt-get install cmake googletest libssl-dev
67+
sudo apt-get install cmake libssl-dev
7068
```
7169

7270
abseil-cpp may need to be installed from source if an LTS release is not
@@ -80,14 +78,6 @@ On macOS, use [MacPorts](http://www.macports.org/) or
8078
sudo port install cmake abseil gtest openssl
8179
```
8280

83-
then use
84-
85-
```
86-
cmake -DGOOGLETEST_ROOT=/opt/local/src -DCMAKE_PREFIX_PATH=/opt/local ..
87-
```
88-
89-
in the build instructions below.
90-
9181
## Build and Install
9282

9383
You may either download the source as a ZIP archive, or [clone the git
@@ -125,11 +115,11 @@ From the appropriate directory depending on how you got the source:
125115
```
126116
mkdir build
127117
cd build
128-
# You can omit -DGOOGLETEST_ROOT to skip tests; see above for macOS.
118+
# You can use -DBUILD_TESTS=no to skip tests.
129119
# Use the same CMAKE_CXX_STANDARD value that was used with absl.
130-
cmake -DGOOGLETEST_ROOT=/usr/src/googletest -DCMAKE_PREFIX_PATH=/path/to/absl/install -DCMAKE_CXX_STANDARD=17 ..
120+
cmake -DBUILD_TESTS=yes -DCMAKE_PREFIX_PATH=/path/to/absl/install -DCMAKE_CXX_STANDARD=17 ..
131121
make -j $(nproc)
132-
make test ARGS="-j$(nproc)" # If GOOGLETEST_ROOT specified above.
122+
make test ARGS="-j$(nproc)" # If -DBUILD_TESTS=yes was used above.
133123
sudo make install
134124
```
135125

doc/examples/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
add_executable(point_index point_index.cc)
2-
target_link_libraries(point_index LINK_PUBLIC s2testing s2)
2+
target_link_libraries(point_index LINK_PUBLIC s2)
33
add_executable(term_index term_index.cc)
4-
target_link_libraries(term_index LINK_PUBLIC s2testing s2)
4+
target_link_libraries(term_index LINK_PUBLIC s2)

0 commit comments

Comments
 (0)