From: Kefu Chai Date: Fri, 29 Jul 2016 16:26:43 +0000 (+0800) Subject: cmake: link libcommon against pthread X-Git-Tag: ses5-milestone5~253^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10489%2Fhead;p=ceph.git cmake: link libcommon against pthread as Thread.cc lives in libcommon, and global is not using libpthread directly. so moving libpthread linkage from libglobal to libcommon. Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 463d0d3c2e33..5a7e6126b9fa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -508,7 +508,7 @@ add_library(common STATIC ${libcommon_files} $) target_link_libraries(common json_spirit erasure_code rt resolv ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${Backtrace_LIBRARIES} - ${CRYPTO_LIBS} ${CMAKE_DL_LIBS}) + ${CRYPTO_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) set_source_files_properties(${CMAKE_SOURCE_DIR}/src/ceph_ver.c ${CMAKE_SOURCE_DIR}/src/common/version.cc diff --git a/src/global/CMakeLists.txt b/src/global/CMakeLists.txt index 7cbee098d977..f9a1c264ed32 100644 --- a/src/global/CMakeLists.txt +++ b/src/global/CMakeLists.txt @@ -7,4 +7,4 @@ set(global_common_files add_library(global_common_objs OBJECT ${global_common_files}) add_library(global STATIC ${libglobal_srcs} $) -target_link_libraries(global common ${CMAKE_THREAD_LIBS_INIT} ${EXTRALIBS}) +target_link_libraries(global common ${EXTRALIBS})