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}"