]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Cmake: fix using CMAKE_DL_LIBS instead of dl 10317/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 16 Jul 2016 12:08:45 +0000 (14:08 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sat, 16 Jul 2016 12:08:45 +0000 (14:08 +0200)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/CMakeLists.txt
src/erasure-code/CMakeLists.txt
src/test/erasure-code/CMakeLists.txt
src/test/osd/CMakeLists.txt
src/tracing/CMakeLists.txt

index b807cb4f2e327aa280115915a2fe5373385cdff3..7257ca9ce024039a2d576469dfd20c7869f08516 100644 (file)
@@ -197,7 +197,7 @@ else(INTEL_SSE4_1)
 endif(INTEL_SSE4_1)
 
 
-set(EXTRALIBS uuid rt dl ${ATOMIC_OPS_LIBRARIES})
+set(EXTRALIBS uuid rt ${CMAKE_DL_LIBS} ${ATOMIC_OPS_LIBRARIES})
 
 if(${WITH_PROFILER})
   list(APPEND EXTRALIBS profiler)
@@ -615,7 +615,7 @@ add_executable(ceph-objectstore-tool
   tools/ceph_objectstore_tool.cc
   tools/RadosDump.cc
   $<TARGET_OBJECTS:common_util_obj>)
-target_link_libraries(ceph-objectstore-tool osd os global ${Boost_PROGRAM_OPTIONS_LIBRARY} fuse dl)
+target_link_libraries(ceph-objectstore-tool osd os global ${Boost_PROGRAM_OPTIONS_LIBRARY} fuse ${CMAKE_DL_LIBS})
 install(TARGETS ceph-objectstore-tool DESTINATION bin)
 
 
@@ -945,7 +945,7 @@ add_library(osd STATIC ${osd_srcs}
   $<TARGET_OBJECTS:global_common_objs>
   $<TARGET_OBJECTS:heap_profiler_objs>
   $<TARGET_OBJECTS:common_util_obj>)
-target_link_libraries(osd dl leveldb ${ALLOC_LIBS})
+target_link_libraries(osd ${CMAKE_DL_LIBS} leveldb ${ALLOC_LIBS})
 if(WITH_LTTNG)
   add_dependencies(osd osd-tp)
 endif()
index 940bc2662fcf24f5de8ae5531a51aa1f40ba7fc5..a0a096f565d1e2f4aed527d531ad52299fa7122f 100644 (file)
@@ -16,7 +16,7 @@ if (HAVE_BETTER_YASM_ELF64)
 endif (HAVE_BETTER_YASM_ELF64)
 
 add_library(erasure_code STATIC ErasureCodePlugin.cc)
-target_link_libraries(erasure_code dl)
+target_link_libraries(erasure_code ${CMAKE_DL_LIBS})
 add_dependencies(erasure_code ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
 
 add_library(erasure_code_objs OBJECT ErasureCode.cc)
index afebc1f193e78da9e5499edc1cb79e31a4d7c03e..1fd38dca7c288f899637be6c3231e2bca753c882 100644 (file)
@@ -2,15 +2,15 @@
 add_executable(ceph_erasure_code_benchmark 
   ${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
   ceph_erasure_code_benchmark.cc)
-target_link_libraries(ceph_erasure_code_benchmark osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global dl)
+target_link_libraries(ceph_erasure_code_benchmark osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
 install(TARGETS ceph_erasure_code_benchmark
   DESTINATION bin)
 
 add_executable(ceph_erasure_code_non_regression ceph_erasure_code_non_regression.cc)
-target_link_libraries(ceph_erasure_code_non_regression osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global dl)
+target_link_libraries(ceph_erasure_code_non_regression osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
 
 add_executable(ceph_erasure_code ceph_erasure_code.cc)
-target_link_libraries(ceph_erasure_code osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global dl)
+target_link_libraries(ceph_erasure_code osd common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
 install(TARGETS ceph_erasure_code
   DESTINATION bin)
 
@@ -49,7 +49,7 @@ add_ceph_unittest(unittest_erasure_code_plugin ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
 target_link_libraries(unittest_erasure_code_plugin
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   ec_example
   common
   )
@@ -136,7 +136,7 @@ target_link_libraries(unittest_erasure_code_plugin_isa
   common
   ec_isa
   crush
-  dl
+  ${CMAKE_DL_LIBS}
   erasure_code
   )
 endif(HAVE_BETTER_YASM_ELF64)
@@ -150,7 +150,7 @@ add_ceph_unittest(unittest_erasure_code_lrc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/un
 target_link_libraries(unittest_erasure_code_lrc
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   ec_lrc
   common
   )
@@ -169,7 +169,7 @@ add_dependencies(unittest_erasure_code_plugin_lrc
 target_link_libraries(unittest_erasure_code_plugin_lrc
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   ec_lrc
   ec_jerasure_generic
   common)
@@ -198,7 +198,7 @@ add_ceph_unittest(unittest_erasure_code_plugin_shec ${CMAKE_RUNTIME_OUTPUT_DIREC
 target_link_libraries(unittest_erasure_code_plugin_shec
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   ec_shec_generic)
 add_dependencies(unittest_erasure_code_plugin_shec 
@@ -220,7 +220,7 @@ add_ceph_unittest(unittest_erasure_code_example ${CMAKE_RUNTIME_OUTPUT_DIRECTORY
 target_link_libraries(unittest_erasure_code_example
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   erasure_code
   ${UNITTEST_LIBS}
@@ -253,7 +253,7 @@ add_ceph_unittest(unittest_erasure_code_shec ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/u
 target_link_libraries(unittest_erasure_code_shec
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   ec_shec_generic
   )
@@ -266,7 +266,7 @@ add_ceph_unittest(unittest_erasure_code_shec_all ${CMAKE_RUNTIME_OUTPUT_DIRECTOR
 target_link_libraries(unittest_erasure_code_shec_all
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   ec_shec_generic
   )
@@ -279,7 +279,7 @@ add_ceph_unittest(unittest_erasure_code_shec_thread ${CMAKE_RUNTIME_OUTPUT_DIREC
 target_link_libraries(unittest_erasure_code_shec_thread
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   ec_shec_generic
   )
@@ -293,7 +293,7 @@ add_ceph_unittest(unittest_erasure_code_shec_arguments ${CMAKE_RUNTIME_OUTPUT_DI
 target_link_libraries(unittest_erasure_code_shec_arguments
   global
   osd
-  dl
+  ${CMAKE_DL_LIBS}
   common
   ec_shec_generic
   )
index 2ba9fdbfcb093c08b232bf69d576f2b9493accd9..baf26aec810d1a6995b5077eb71c82ebdd2edf56 100644 (file)
@@ -52,14 +52,14 @@ add_executable(unittest_osdscrub
   TestOSDScrub.cc
   )
 add_ceph_unittest(unittest_osdscrub ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdscrub)
-target_link_libraries(unittest_osdscrub osd global dl os mon ${BLKID_LIBRARIES})
+target_link_libraries(unittest_osdscrub osd global ${CMAKE_DL_LIBS} os mon ${BLKID_LIBRARIES})
 
 # unittest_pglog
 add_executable(unittest_pglog
   TestPGLog.cc
   )
 add_ceph_unittest(unittest_pglog ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pglog)
-target_link_libraries(unittest_pglog osd global dl ${BLKID_LIBRARIES})
+target_link_libraries(unittest_pglog osd global ${CMAKE_DL_LIBS} ${BLKID_LIBRARIES})
 
 # unittest_hitset
 add_executable(unittest_hitset
index 2bc837b870fc1f8b14fde2d516d2a417121ee86b..7d0749d9ee1f7c7a1eb2398a5aff15f8c587dbec 100644 (file)
@@ -30,7 +30,7 @@ function(add_tracing_library name tracings version)
       ${header_dir}/${tp}.c)
   endforeach()
   add_library(${name} SHARED ${srcs})
-  target_link_libraries(${name} ${LTTNG_LIBRARIES} dl)
+  target_link_libraries(${name} ${LTTNG_LIBRARIES} ${CMAKE_DL_LIBS})
   string(REGEX MATCH "^[0-9]+" soversion ${version})
   set_target_properties(${name} PROPERTIES
     OUTPUT_NAME ${name}