[geos-commits] [SCM] GEOS branch main updated. cf859843556dd76e9597c588543915b7aa7d7bc4
git at osgeo.org
git at osgeo.org
Mon May 4 14:32:21 PDT 2026
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 cf859843556dd76e9597c588543915b7aa7d7bc4 (commit)
from 0028dd486e18abb779d3c1d1dfeb1a3f34e4af5c (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 cf859843556dd76e9597c588543915b7aa7d7bc4
Author: MUGUNDAN <mugunthan.selvanayagam at multicorewareinc.com>
Date: Mon May 4 17:31:58 2026 -0400
Fix GEOS benchmarking on Windows (#1429)
* Fix GEOS benchmarking on Windows
* Add instructions for benchmarking Geos library
diff --git a/benchmarks/README.md b/benchmarks/README.md
index 65eb4b4f9..760815be6 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -1,10 +1,64 @@
-## Benchmarks
+## Building
-A variety of programs to execute various kinds of tests,
-including benchmarks, stability and robustness tests.
+Building the benchmark tests must be enabled using:
-### Building
+```bash
+cmake -DBUILD_BENCHMARKS=ON ..
+```
-Building the benchmark tests must be enabled using
+Geos uses Google Benchmarks for validating performance of Geos library. It can be built using the following ways:
- cmake -DBUILD_BENCHMARKS=ON ..
+### Linux
+
+Install via package manager:
+
+```bash
+# Debian/Ubuntu
+sudo apt install libbenchmark-dev
+
+# Fedora
+sudo dnf install google-benchmark-devel
+```
+
+Then build:
+
+```bash
+mkdir build && cd build
+cmake -DBUILD_BENCHMARKS=ON ..
+make -j$(nproc)
+```
+
+### Windows (MSYS2)
+
+Install Google Benchmark via pacman:
+
+```bash
+# MINGW64
+pacman -S mingw-w64-x86_64-benchmark
+
+# UCRT64
+pacman -S mingw-w64-ucrt-x86_64-benchmark
+
+# CLANG64
+pacman -S mingw-w64-clang-x86_64-benchmark
+
+# CLANGARM64
+pacman -S mingw-w64-clang-aarch64-benchmark
+```
+
+Then build:
+
+```bash
+mkdir build && cd build
+cmake -G "MinGW Makefiles" -DBUILD_BENCHMARKS=ON ..
+mingw32-make -j$(nproc)
+```
+
+### Windows (MSVC / vcpkg)
+
+```bash
+vcpkg install benchmark:x64-windows
+mkdir build && cd build
+cmake -DBUILD_BENCHMARKS=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake ..
+cmake --build . --config Release
+```
diff --git a/benchmarks/algorithm/CMakeLists.txt b/benchmarks/algorithm/CMakeLists.txt
index 3b8f867a5..6e8382307 100644
--- a/benchmarks/algorithm/CMakeLists.txt
+++ b/benchmarks/algorithm/CMakeLists.txt
@@ -29,7 +29,7 @@ if (benchmark_FOUND)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>)
target_link_libraries(perf_orientation PRIVATE
- benchmark::benchmark geos_cxx_flags)
+ benchmark::benchmark geos)
add_executable(perf_line_intersector LineIntersectorPerfTest.cpp)
target_include_directories(perf_line_intersector PUBLIC
diff --git a/benchmarks/algorithm/OrientationIndexStressTest.cpp b/benchmarks/algorithm/OrientationIndexStressTest.cpp
index 24e19677f..c4c6f7246 100644
--- a/benchmarks/algorithm/OrientationIndexStressTest.cpp
+++ b/benchmarks/algorithm/OrientationIndexStressTest.cpp
@@ -43,6 +43,11 @@ Two kinds of test generators are provided:
#include <iomanip>
+// MSVC does not provide POSIX random(), Use rand() for compatibility
+#ifdef _MSC_VER
+#define random rand
+#endif
+
using namespace geos::algorithm;
using namespace geos::geom;
using namespace geos::io;
diff --git a/include/geos/index/intervalrtree/IntervalRTreeLeafNode.h b/include/geos/index/intervalrtree/IntervalRTreeLeafNode.h
index b0c3692a9..5dee32cc6 100644
--- a/include/geos/index/intervalrtree/IntervalRTreeLeafNode.h
+++ b/include/geos/index/intervalrtree/IntervalRTreeLeafNode.h
@@ -15,6 +15,7 @@
#pragma once
+#include <geos/export.h>
#include <geos/index/intervalrtree/IntervalRTreeNode.h> // inherited
@@ -30,7 +31,7 @@ namespace geos {
namespace index {
namespace intervalrtree {
-class IntervalRTreeLeafNode : public IntervalRTreeNode {
+class GEOS_DLL IntervalRTreeLeafNode : public IntervalRTreeNode {
private:
/// externally owned
void* item;
diff --git a/include/geos/index/intervalrtree/SortedPackedIntervalRTree.h b/include/geos/index/intervalrtree/SortedPackedIntervalRTree.h
index ec472613e..b97623023 100644
--- a/include/geos/index/intervalrtree/SortedPackedIntervalRTree.h
+++ b/include/geos/index/intervalrtree/SortedPackedIntervalRTree.h
@@ -15,6 +15,7 @@
#pragma once
+#include <geos/export.h>
#include <geos/index/intervalrtree/IntervalRTreeNode.h>
#include <geos/index/intervalrtree/IntervalRTreeBranchNode.h>
#include <geos/index/intervalrtree/IntervalRTreeLeafNode.h>
@@ -48,7 +49,7 @@ namespace intervalrtree {
* @author Martin Davis
*
*/
-class SortedPackedIntervalRTree {
+class GEOS_DLL SortedPackedIntervalRTree {
private:
std::vector<IntervalRTreeLeafNode> leaves;
std::vector<IntervalRTreeBranchNode> branches;
-----------------------------------------------------------------------
Summary of changes:
benchmarks/README.md | 66 ++++++++++++++++++++--
benchmarks/algorithm/CMakeLists.txt | 2 +-
.../algorithm/OrientationIndexStressTest.cpp | 5 ++
.../index/intervalrtree/IntervalRTreeLeafNode.h | 3 +-
.../intervalrtree/SortedPackedIntervalRTree.h | 3 +-
5 files changed, 70 insertions(+), 9 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list