diff --git a/CMakeLists.txt b/CMakeLists.txt index bd22e8d99..411d75d60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,8 @@ if(NOT MSVC) # Allows wine to display source code file names and line numbers on crash in its backtrace add_flag("-gdwarf-2") endif() + # Crash on signed integer overflow. + add_flag("-ftrapv") endif() option(WARNINGS "Enable additional compiler warnings" ON)