Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default sanitizers to ON when BUILD_TESTING #3045

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading