mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 06:35:31 +00:00
cmake: add 'ASan' build type
This commit is contained in:
parent
0933d1fe3f
commit
469238a9a5
|
@ -9,6 +9,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
|
||||
set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 --coverage")
|
||||
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-omit-frame-pointer -g3 -O1")
|
||||
set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wlogical-op -Wwrite-strings")
|
||||
set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual")
|
||||
endif(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
@ -17,11 +18,12 @@ if(CMAKE_COMPILER_IS_CLANG)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
|
||||
set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 --coverage")
|
||||
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-omit-frame-pointer -g3 -O1")
|
||||
set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wpointer-arith -Wwrite-strings -Wdocumentation")
|
||||
endif(CMAKE_COMPILER_IS_CLANG)
|
||||
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
|
||||
CACHE STRING "Choose the type of build: None Debug Release Coverage Check CheckFull"
|
||||
CACHE STRING "Choose the type of build: None Debug Release Coverage ASan Check CheckFull"
|
||||
FORCE)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
|
|
Loading…
Reference in a new issue