Make sure USE_SANITIZER is not empty before foreach
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
ca4b5a368f
commit
dc57685ac3
1 changed files with 13 additions and 11 deletions
|
@ -173,6 +173,7 @@ endif()
|
|||
|
||||
# Make it easy to enable Clang's/gcc's analyzers
|
||||
set(USE_SANITIZER "" CACHE STRING "Sanitizers to enable on the build.")
|
||||
if(NOT("${USE_SANITIZER}" STREQUAL ""))
|
||||
foreach(san "${USE_SANITIZER}")
|
||||
message(STATUS "Enabling sanitizer: '${san}'")
|
||||
|
||||
|
@ -186,6 +187,7 @@ foreach(san "${USE_SANITIZER}")
|
|||
link_libraries("-fsanitize=${san}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue