summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
commit59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch)
tree3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /configure.cmake
parentce02738d7f2f2688eeec7004dd6a30293d36044f (diff)
parent6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff)
downloadmariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz
5.5 merge
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake4
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)