mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-03-06 21:00:31 +01:00
Set -DSANITIZE to a comma-separated list of options to pass to -fsanitize=, like -DSANITIZE=address,undefined
8 lines
No EOL
272 B
CMake
8 lines
No EOL
272 B
CMake
set(SANITIZE "" CACHE STRING "Sanitizers to enable.")
|
|
|
|
string(REGEX MATCHALL "[^,]+" ENABLED_SANITIZERS "${SANITIZE}")
|
|
|
|
foreach(SANITIZER ${ENABLED_SANITIZERS})
|
|
add_compile_options("-fsanitize=${SANITIZER}")
|
|
add_link_options("-fsanitize=${SANITIZER}")
|
|
endforeach() |