[geos-commits] [SCM] GEOS branch main updated. 793e19a7d997e05ff817e9741a40f17371ed9276

git at osgeo.org git at osgeo.org
Fri Oct 25 11:29:06 PDT 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, main has been updated
       via  793e19a7d997e05ff817e9741a40f17371ed9276 (commit)
      from  d7c51c401213d11f5dafd56596295274433379b6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 793e19a7d997e05ff817e9741a40f17371ed9276
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Oct 25 11:28:42 2024 -0700

    Warn when Google benchmarks are not found but benchmarks are requested.

diff --git a/benchmarks/algorithm/CMakeLists.txt b/benchmarks/algorithm/CMakeLists.txt
index 8b829c21e..cf89a52e5 100644
--- a/benchmarks/algorithm/CMakeLists.txt
+++ b/benchmarks/algorithm/CMakeLists.txt
@@ -16,6 +16,8 @@ target_link_libraries(perf_interiorpoint_area geos)
 add_executable(perf_unaryunion_segments UnaryUnionSegmentsPerfTest.cpp)
 target_link_libraries(perf_unaryunion_segments geos)
 
+if (BUILD_BENCHMARKS)
+
 if (benchmark_FOUND)
     add_executable(perf_orientation OrientationIndexPerfTest.cpp
             ${PROJECT_SOURCE_DIR}/src/algorithm/CGAlgorithmsDD.cpp
@@ -41,6 +43,12 @@ if (benchmark_FOUND)
             $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>)
     target_link_libraries(perf_voronoi PRIVATE
             benchmark::benchmark geos)
+else()
+  MESSAGE(WARNING "Unable to find google benchmarks library!")
+  MESSAGE(WARNING "  Some benchmarks will not be built!")
+  MESSAGE(WARNING "  See https://github.com/google/benchmark")
+endif()
+
 endif()
 
 add_subdirectory(locate)
diff --git a/benchmarks/algorithm/LineIntersectorPerfTest.cpp b/benchmarks/algorithm/LineIntersectorPerfTest.cpp
index eaa1d7762..151fe5a52 100644
--- a/benchmarks/algorithm/LineIntersectorPerfTest.cpp
+++ b/benchmarks/algorithm/LineIntersectorPerfTest.cpp
@@ -32,8 +32,8 @@ using geos::algorithm::LineIntersector;
 
 template<typename CoordType>
 static void BM_PointIntersection(benchmark::State& state) {
-    std::size_t n = 1000;
-    std::size_t seed = 12345;
+    unsigned int n = 1000;
+    unsigned int seed = 12345;
 
     std::default_random_engine e(seed);
 

-----------------------------------------------------------------------

Summary of changes:
 benchmarks/algorithm/CMakeLists.txt              | 8 ++++++++
 benchmarks/algorithm/LineIntersectorPerfTest.cpp | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list