[geos-commits] [SCM] GEOS branch main updated. de22f50d319ce72004d0228fef00a3964eeb6a6a
git at osgeo.org
git at osgeo.org
Wed Dec 10 15:29:03 PST 2025
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 de22f50d319ce72004d0228fef00a3964eeb6a6a (commit)
from be7330861f6d0d7a029e80a135634c81afd705ef (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 de22f50d319ce72004d0228fef00a3964eeb6a6a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Dec 10 15:28:23 2025 -0800
Add UBSAN build option to CMakeLists
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 852c724ab..d114245cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,9 +179,22 @@ set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -fsanitize=address -f
set(CMAKE_EXE_LINKER_FLAGS_ASAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address")
+#-----------------------------------------------------------------------------
+# Add UBSAN build option
+#-----------------------------------------------------------------------------
+
+set(CMAKE_C_FLAGS_UBSAN "${CMAKE_C_FLAGS_DEBUG} -fsanitize=undefined")
+set(CMAKE_CXX_FLAGS_UBSAN "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined")
+set(CMAKE_EXE_LINKER_FLAGS_UBSAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=undefined")
+set(CMAKE_SHARED_LINKER_FLAGS_UBSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=undefined")
+
+#-----------------------------------------------------------------------------
+# Add ASAN and UBSAN as explicit items in menu
+#-----------------------------------------------------------------------------
+
get_property(_cmake_build_type_is_cache CACHE CMAKE_BUILD_TYPE PROPERTY TYPE)
if (_cmake_build_type_is_cache)
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN")
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN" "UBSAN")
endif()
unset(_cmake_build_type_is_cache)
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list