Skip to content

Commit 2655454

Browse files
committed
fix: enable sanitizers correctly
1 parent f5897a8 commit 2655454

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Sanitizers.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ function(
3838
"pointer-compare"
3939
"pointer-subtract"
4040
)
41-
if(${ENABLE_SANITIZER_${SANITIZER}})
42-
if(${SUPPORTS_SANITIZER_${SANITIZER}})
41+
set(SANITIZER_UPPERCASE "${SANITIZER}")
42+
string(TOUPPER ${SANITIZER} SANITIZER_UPPERCASE)
43+
44+
if(${ENABLE_SANITIZER_${SANITIZER_UPPERCASE}})
45+
if(${SUPPORTS_SANITIZER_${SANITIZER_UPPERCASE}})
4346
list(APPEND SANITIZERS ${SANITIZER})
4447
else()
4548
# do not enable the sanitizer if it is not supported

0 commit comments

Comments
 (0)