Skip to content

Commit

Permalink
Default sanitizers to ON when BUILD_TESTING (#3045)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch authored Nov 23, 2024
1 parent b6dca73 commit 19f97d4
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ option(FPRIME_CHECK_FRAMEWORK_VERSION "(Internal) Check framework version when b
#
# **Values:**
# - ON: enables AddressSanitizer.
# - OFF: (default) does not enable AddressSanitizer.
# - OFF: does not enable AddressSanitizer.
#
# e.g. `-DENABLE_SANITIZER_ADDRESS=ON`
# Defaults to ON when BUILD_TESTING is ON
#
# e.g. `-DENABLE_SANITIZER_ADDRESS=OFF`
####
option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" OFF)
option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" BUILD_TESTING)

####
# `ENABLE_SANITIZER_LEAK:`
Expand All @@ -215,11 +217,13 @@ option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" OFF)
#
# **Values:**
# - ON: enables LeakSanitizer.
# - OFF: (default) does not enable LeakSanitizer.
# - OFF: does not enable LeakSanitizer.
#
# Defaults to ON when BUILD_TESTING is ON
#
# e.g. `-DENABLE_SANITIZER_LEAK=ON`
# e.g. `-DENABLE_SANITIZER_LEAK=OFF`
####
option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" OFF)
option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" BUILD_TESTING)

####
# `ENABLE_SANITIZER_UNDEFINED_BEHAVIOR:`
Expand All @@ -230,11 +234,13 @@ option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" OFF)
#
# **Values:**
# - ON: enables UndefinedBehaviorSanitizer.
# - OFF: (default) does not enable UndefinedBehaviorSanitizer.
# - OFF: does not enable UndefinedBehaviorSanitizer.
#
# Defaults to ON when BUILD_TESTING is ON
#
# e.g. `-DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON`
####
option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" OFF)
option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" BUILD_TESTING)

####
# `ENABLE_SANITIZER_THREAD:`
Expand Down

0 comments on commit 19f97d4

Please sign in to comment.