File: sanitizers.cmake

package info (click to toggle)
therion 6.3.4-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,544 kB
  • sloc: cpp: 195,273; tcl: 19,779; ansic: 8,434; perl: 1,895; makefile: 1,281; python: 255; asm: 219; sh: 104
file content (11 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# Enable sanitizers.

# Fail on errors.
set(CMAKE_C_FLAGS_INIT "-fno-sanitize-recover=all")
set(CMAKE_CXX_FLAGS_INIT "-fno-sanitize-recover=all")

# Optimizations help to uncover bugs, debug symbols make reports from sanitizers readable.
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build.")

# ASan and UBSan can be run together.
set(ECM_ENABLE_SANITIZERS "address;undefined" CACHE STRING "Enable runtime sanitizers, available options: address,memory,thread,leak,undefined." )