Sanitize: Add sanitize flags to shared libraries

For MSVC, all libraries need to have the same flags,
therefore we add them here.

Change-Id: If980ca138dfde0a5ec52b1879c2c703309950a37
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-09-20 00:06:10 -07:00
parent a0f008b8e1
commit 5f1e4418de
3 changed files with 12 additions and 0 deletions

View File

@@ -11,3 +11,7 @@ if (WIN32)
target_compile_definitions(shared_qtlockedfile PRIVATE
"QT_QTLOCKEDFILE_EXPORT=__declspec(dllexport)" _UNICODE UNICODE)
endif()
if (WITH_SANITIZE)
qtc_enable_sanitize(shared_qtlockedfile ${SANITIZE_FLAGS})
endif()

View File

@@ -7,3 +7,7 @@ target_include_directories(shared_qtsingleapplication PUBLIC "${CMAKE_CURRENT_SO
if (WIN32)
target_compile_definitions(shared_qtsingleapplication PRIVATE "QT_QTSINGLEAPPLICATION_EXPORT=__declspec(dllexport)")
endif()
if (WITH_SANITIZE)
qtc_enable_sanitize(shared_qtsingleapplication ${SANITIZE_FLAGS})
endif()

View File

@@ -6,3 +6,7 @@ if (WIN32)
else()
add_library(registryaccess INTERFACE)
endif()
if (WITH_SANITIZE)
qtc_enable_sanitize(registryaccess ${SANITIZE_FLAGS})
endif()