otherwised we'd have
```
CMake Error at cmake/modules/FindSanitizers.cmake:17 (if):
if given arguments:
"address" "IN_LIST" "address" "thread" "undefined_behavior" "OR" "leak" "IN_LIST" "address" "thread" "undefined_behavior"
Unknown arguments specified
```
when enabling TSan with WITH_TSAN=ON.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
elseif(component STREQUAL "leak")
set(Sanitizers_leak_COMPILE_OPTIONS "-fsanitize=leak")
elseif(component STREQUAL "thread")
- if ("address" IN_LIST ${Sanitizers_FIND_COMPONENTS} OR
- "leak" IN_LIST ${Sanitizers_FIND_COMPONENTS})
+ if ("address" IN_LIST "${Sanitizers_FIND_COMPONENTS}" OR
+ "leak" IN_LIST "${Sanitizers_FIND_COMPONENTS}")
message(SEND_ERROR "Cannot combine -fsanitize-leak w/ -fsanitize-thread")
elseif(NOT CMAKE_POSITION_INDEPENDENT_CODE)
message(SEND_ERROR "TSan requires all code to be position independent")