diff options
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 5af8ec3a021..708339dfef1 100644 --- a/configure.cmake +++ b/configure.cmake @@ -139,6 +139,10 @@ IF(UNIX) SET(CMAKE_REQUIRED_LIBRARIES ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}) + # Need explicit pthread for gcc -fsanitize=address + IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=") + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread) + ENDIF() IF(CMAKE_REQUIRED_LIBRARIES) LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) |