CMakeFiles.txt: fix sanitizers
This commit is contained in:
parent
f4b52b5450
commit
055f59ad45
@ -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()
|
||||
|
||||
@ -171,17 +171,17 @@ function(give_options_without_warnings target)
|
||||
$<$<BOOL:${TWN_SANITIZE}>:-fstack-protector-all -fsanitize=undefined -fsanitize=address>
|
||||
$<$<BOOL:${EMSCRIPTEN}>:-gsource-map>)
|
||||
|
||||
target_compile_options(${target} PRIVATE
|
||||
target_compile_options(${target} PUBLIC
|
||||
${BUILD_FLAGS}
|
||||
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>)
|
||||
|
||||
target_link_options(${target} PRIVATE
|
||||
target_link_options(${target} PUBLIC
|
||||
${BUILD_FLAGS}
|
||||
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${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}"
|
||||
|
Loading…
Reference in New Issue
Block a user