Skip to content

Commit

Permalink
fix: enable sanitizers correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Oct 4, 2024
1 parent f5897a8 commit 2655454
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Sanitizers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ function(
"pointer-compare"
"pointer-subtract"
)
if(${ENABLE_SANITIZER_${SANITIZER}})
if(${SUPPORTS_SANITIZER_${SANITIZER}})
set(SANITIZER_UPPERCASE "${SANITIZER}")
string(TOUPPER ${SANITIZER} SANITIZER_UPPERCASE)

if(${ENABLE_SANITIZER_${SANITIZER_UPPERCASE}})
if(${SUPPORTS_SANITIZER_${SANITIZER_UPPERCASE}})
list(APPEND SANITIZERS ${SANITIZER})
else()
# do not enable the sanitizer if it is not supported
Expand Down

0 comments on commit 2655454

Please sign in to comment.