File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,15 @@ set(SANITIZERS "address;undefined" CACHE STRING "List of sanitizers to build wit
11
11
# sanitizer: The sanitizer to check
12
12
# out_variable: The variable to assign the result to. Defaults to HAS_SANITIZER_${sanitizer}
13
13
function (aws_check_sanitizer sanitizer )
14
-
15
- if (NOT ${ARGN} )
16
- set (out_variable "${ARGN} " )
17
- else ()
14
+ list (LENGTH ARGN extra_count )
15
+ if (${extra_count} EQUAL 0 )
18
16
set (out_variable HAS_SANITIZER_${sanitizer} )
19
17
# Sanitize the variable name to remove illegal characters
20
18
string (MAKE_C_IDENTIFIER ${out_variable} out_variable )
19
+ elseif (${extra_count} EQUAL 1 )
20
+ set (out_variable ${ARGN} )
21
+ else ()
22
+ message (FATAL_ERROR "Error: aws_check_sanitizer() called with multiple out variables" )
21
23
endif ()
22
24
23
25
if (ENABLE_SANITIZERS )
You can’t perform that action at this time.
0 commit comments