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

Fix memory sanitizer to be on by default #3183

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Changes from 2 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
12 changes: 3 additions & 9 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ option(FPRIME_CHECK_FRAMEWORK_VERSION "(Internal) Check framework version when b
#
# e.g. `-DENABLE_SANITIZER_ADDRESS=OFF`
####
option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" BUILD_TESTING)
option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" ${BUILD_TESTING})

####
# `ENABLE_SANITIZER_LEAK:`
Expand All @@ -223,7 +223,7 @@ option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" BUILD_TESTING)
#
# e.g. `-DENABLE_SANITIZER_LEAK=OFF`
####
option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" BUILD_TESTING)
option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" ${BUILD_TESTING})

####
# `ENABLE_SANITIZER_UNDEFINED_BEHAVIOR:`
Expand All @@ -240,7 +240,7 @@ option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" BUILD_TESTING)
#
# e.g. `-DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON`
####
option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" BUILD_TESTING)
option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" ${BUILD_TESTING})

####
# `ENABLE_SANITIZER_THREAD:`
Expand All @@ -259,12 +259,6 @@ option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer"
####
option(ENABLE_SANITIZER_THREAD "Enable thread sanitizer" OFF)

# Backwards compatibility, when build type=TESTING BUILD_TESTING is on
string(TOUPPER "${CMAKE_BUILD_TYPE}" FPRIME_BUILD_TYPE)
if (FPRIME_BUILD_TYPE STREQUAL "TESTING")
else()
option(BUILD_TESTING OFF)
endif()
include(CTest)

####
Expand Down
Loading