From 055f59ad459e6ce19e52f7a2a55ca1fb121e90e7 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Fri, 27 Sep 2024 17:49:56 +0300 Subject: [PATCH] CMakeFiles.txt: fix sanitizers --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80e9132..cca39e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -if(CMAKE_BUILD_TYPE MATCHES Debug) +if(NOT TWN_SANITIZE AND CMAKE_BUILD_TYPE MATCHES Debug) set(TWN_SANITIZE ON) endif() @@ -168,20 +168,20 @@ function(give_options_without_warnings target) -g3 -gdwarf -fno-omit-frame-pointer - $<$:-fstack-protector-all -fsanitize=undefined -fsanitize=address> + $<$:-fstack-protector-all -fsanitize=undefined -fsanitize=address> $<$:-gsource-map>) - target_compile_options(${target} PRIVATE + target_compile_options(${target} PUBLIC ${BUILD_FLAGS} $<$:${BUILD_FLAGS_RELEASE}> $<$:${BUILD_FLAGS_DEBUG}>) - target_link_options(${target} PRIVATE + target_link_options(${target} PUBLIC ${BUILD_FLAGS} $<$:${BUILD_FLAGS_RELEASE}> $<$:${BUILD_FLAGS_DEBUG}>) - target_compile_definitions(${target} PRIVATE + target_compile_definitions(${target} PUBLIC ORGANIZATION_NAME="${ORGANIZATION_NAME}" APP_NAME="${APP_NAME}" PACKAGE_EXTENSION="${PACKAGE_EXTENSION}"