Add lsan cmake flag
This commit is contained in:
parent
c9c5c89c81
commit
2e147367eb
2 changed files with 6 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
|
||||||
option(SRB2_CONFIG_TRACY "Compile with Tracy profiling enabled" OFF)
|
option(SRB2_CONFIG_TRACY "Compile with Tracy profiling enabled" OFF)
|
||||||
option(SRB2_CONFIG_ASAN "Compile with AddressSanitizer (libasan)." OFF)
|
option(SRB2_CONFIG_ASAN "Compile with AddressSanitizer (libasan)." OFF)
|
||||||
option(SRB2_CONFIG_UBSAN "Compile with UndefinedBehaviorSanitizer (libubsan)." OFF)
|
option(SRB2_CONFIG_UBSAN "Compile with UndefinedBehaviorSanitizer (libubsan)." OFF)
|
||||||
|
option(SRB2_CONFIG_LSAN "Compile with LeakSanitizer (liblsan)." OFF)
|
||||||
option(SRB2_CONFIG_NOVERIFYIWADS "Compile with IWAD verification turned off." OFF)
|
option(SRB2_CONFIG_NOVERIFYIWADS "Compile with IWAD verification turned off." OFF)
|
||||||
set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
|
set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
|
||||||
option(SRB2_CONFIG_LTO "Enable link time optimizations, improves performance at the cost of longer link times." ON)
|
option(SRB2_CONFIG_LTO "Enable link time optimizations, improves performance at the cost of longer link times." ON)
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,11 @@ if(SRB2_CONFIG_UBSAN)
|
||||||
target_link_options(BLANKART PRIVATE -fsanitize=undefined)
|
target_link_options(BLANKART PRIVATE -fsanitize=undefined)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(SRB2_CONFIG_LSAN)
|
||||||
|
target_compile_options(BLANKART PRIVATE -fsanitize=leak)
|
||||||
|
target_link_options(BLANKART PRIVATE -fsanitize=leak)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SRB2_CONFIG_TIDY)
|
if(SRB2_CONFIG_TIDY)
|
||||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
|
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue