Removed continue statement in FindASan.cmake

Older CMake versions are not capable of continue in foreach functions.
This commit is contained in:
Alexander Haase 2015-11-19 16:38:53 +01:00
parent 41e635c9ca
commit e39082050c

View File

@ -42,18 +42,12 @@ set(CMAKE_REQUIRED_QUIET ${ASan_FIND_QUIETLY})
set(_ASAN_REQUIRED_VARS) set(_ASAN_REQUIRED_VARS)
foreach (LANG C CXX) foreach (LANG C CXX)
if (NOT CMAKE_${LANG}_COMPILER_LOADED) if (CMAKE_${LANG}_COMPILER_LOADED)
continue()
endif()
list(APPEND _ASAN_REQUIRED_VARS ASAN_${LANG}_FLAGS) list(APPEND _ASAN_REQUIRED_VARS ASAN_${LANG}_FLAGS)
# If flags for this compiler were already found, do not try to find them # If flags for this compiler were already found, do not try to find them
# again. # again.
if (ASAN_${LANG}_FLAGS) if (NOT ASAN_${LANG}_FLAGS)
continue()
endif ()
foreach (FLAG ${ASAN_FLAG_CANDIDATES}) foreach (FLAG ${ASAN_FLAG_CANDIDATES})
if(NOT CMAKE_REQUIRED_QUIET) if(NOT CMAKE_REQUIRED_QUIET)
message(STATUS "Try Address sanitizer ${LANG} flag = [${FLAG}]") message(STATUS "Try Address sanitizer ${LANG} flag = [${FLAG}]")
@ -77,6 +71,8 @@ foreach (LANG C CXX)
break() break()
endif () endif ()
endforeach() endforeach()
endif ()
endif ()
endforeach () endforeach ()
set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})