diff --git a/CMakeLists.txt b/CMakeLists.txt index ef723ac..b4ec21b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,7 @@ message(STATUS "BUILD_STATIC: ${BUILD_STATIC}") message(STATUS "ENABLE_SANITIZERS: ${ENABLE_SANITIZERS}") message(STATUS "POST_BUILD_COPY_EXT_LIBS: ${POST_BUILD_COPY_EXT_LIBS}") -if(PLATFORM STREQUAL "macos") - set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0) -elseif(PLATFORM STREQUAL "ios" OR PLATFORM STREQUAL "ios-simulator") +if(PLATFORM STREQUAL "ios" OR PLATFORM STREQUAL "ios-simulator") set(CMAKE_SYSTEM_NAME iOS) if (PLATFORM STREQUAL "ios-simulator") set(CMAKE_OSX_SYSROOT iphonesimulator) @@ -76,11 +74,9 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(ENABLE_SANITIZERS AND (PLATFORM STREQUAL "macos" OR PLATFORM STREQUAL "linux")) - add_compile_options(-fsanitize=address) - add_link_options(-fsanitize=address) - - add_compile_options(-fsanitize=undefined) - add_link_options(-fsanitize=undefined) + set(SANITIZER_FLAGS -fsanitize=address,undefined) + add_compile_options(${SANITIZER_FLAGS} -fno-omit-frame-pointer -g) + add_link_options(${SANITIZER_FLAGS}) endif() endif()