summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2024-02-14 12:34:24 +0100
committerDominik Holland <dominik.holland@qt.io>2024-02-14 15:27:54 +0100
commit8f4f0fab1a888f99eecc8a833914877bd5d080bc (patch)
tree80eb9821f0b14a9b18db4e1f64f565be38601beb
parent7273f629c4347e721f6086a46beade932bd6064d (diff)
CMake: Add a option to create a ASAN build
Change-Id: I56609b514d21a8066ecc5fd803930f504aebee3f Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8d8b082..3c6fde74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,16 @@ if(IF_COVERAGE)
)
endif()
+if (IF_SANITIZE)
+ if (MSVC)
+ set(ECM_ENABLE_SANITIZERS address)
+ else()
+ set(ECM_ENABLE_SANITIZERS address undefined)
+ endif()
+ include(3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers)
+endif()
+
+
qt_build_repo()
if(NOT QT_BUILD_STANDALONE_TESTS)