]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: link libcommon against pthread 10489/head
authorKefu Chai <kchai@redhat.com>
Fri, 29 Jul 2016 16:26:43 +0000 (00:26 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 29 Jul 2016 16:26:44 +0000 (00:26 +0800)
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 <kchai@redhat.com>
src/CMakeLists.txt
src/global/CMakeLists.txt

index 463d0d3c2e334c5e526d350cbce68a1c6069102f..5a7e6126b9fa5a274b50b6e37a5d6d7ffe472334 100644 (file)
@@ -508,7 +508,7 @@ add_library(common STATIC ${libcommon_files}
   $<TARGET_OBJECTS:common_mountcephfs_objs>)
 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
index 7cbee098d977f8c09fce25f8d7f534e4c0f0a747..f9a1c264ed32b8066659953a0c4a318c65311860 100644 (file)
@@ -7,4 +7,4 @@ set(global_common_files
 add_library(global_common_objs OBJECT ${global_common_files})
 add_library(global STATIC ${libglobal_srcs}
   $<TARGET_OBJECTS:global_common_objs>)
-target_link_libraries(global common ${CMAKE_THREAD_LIBS_INIT} ${EXTRALIBS})
+target_link_libraries(global common ${EXTRALIBS})