summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-10-09 16:14:50 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-10-12 13:57:56 +0200
commit18357033b498c3447e408a4aede8e1c7051e06ee (patch)
tree5e7a25845c20409b723b207a0bd441629928e00b /cmake
parent7643295c12f1577c9770ff707c85fc6738ccf62b (diff)
CMake: Fix the -sanitize configure option
This needs to map to ECM_ENABLE_SANITIZERS. Fixes: QTBUG-87316 Change-Id: I9e983728af0ba69fd428944e647f0afae8c61772 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake9
-rw-r--r--cmake/configure-cmake-mapping.md2
2 files changed, 10 insertions, 1 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 455f98224d..5fcc8aad90 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -230,6 +230,14 @@ function(qtConfCommandlineSetInput name val)
set_property(GLOBAL APPEND PROPERTY CONFIG_INPUTS ${name})
endfunction()
+function(qtConfCommandlineAppendInput name val)
+ get_property(oldval GLOBAL PROPERTY INPUT_${name})
+ if(NOT "${oldval}" STREQUAL "")
+ string(PREPEND val "${oldval};")
+ endif()
+ qtConfCommandlineSetInput(${name} "${val}")
+endfunction()
+
function(qtConfValidateValue opt val out_var)
set(${out_var} TRUE PARENT_SCOPE)
@@ -565,6 +573,7 @@ endif()
translate_string_input(platform QT_QMAKE_TARGET_MKSPEC)
translate_string_input(xplatform QT_QMAKE_TARGET_MKSPEC)
translate_string_input(qpa_default_platform QT_QPA_DEFAULT_PLATFORM)
+translate_list_input(sanitize ECM_ENABLE_SANITIZERS)
translate_path_input(android-sdk ANDROID_SDK_ROOT)
if(DEFINED INPUT_android-ndk)
diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md
index 487f9c7354..1b81743e33 100644
--- a/cmake/configure-cmake-mapping.md
+++ b/cmake/configure-cmake-mapping.md
@@ -53,7 +53,7 @@ The effort of this is tracked in QTBUG-85373 and QTBUG-85349.
| -gcov | | |
| -trace [backend] | -DINPUT_trace=yes or -DINPUT_trace=<backend> | |
| | or -DFEATURE_<backend> | |
-| -sanitize <arg> | -DFEATURE_sanitize_<arg> | |
+| -sanitize address -sanitize undefined | -DECM_ENABLE_SANITIZERS=address;undefined | |
| -coverage <arg> | | |
| -c++std c++2a | -DFEATURE_cxx2a=ON | |
| -sse2/-sse3/-ssse3/-sse4.1 | -DFEATURE_sse4=ON | |