]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Boost libraries cleanup
authorAli Maredia <amaredia@redhat.com>
Thu, 31 Dec 2015 05:53:12 +0000 (00:53 -0500)
committerAli Maredia <amaredia@redhat.com>
Tue, 5 Jan 2016 20:42:06 +0000 (15:42 -0500)
Added components to Boost find_package, changed
libraries from boost_foo to ${Boost_FOO_LIBRARY}

Signed-off-by: Ali Maredia <amaredia@redhat.com>
CMakeLists.txt
src/CMakeLists.txt
src/test/CMakeLists.txt

index 27de8806ee5ae2329844bde78216c04f9baa23a0..1fcfe80eb0788f6453ddc27421551ab56f7ec162 100644 (file)
@@ -278,7 +278,7 @@ else(${ENABLE_SHARED})
 endif(${ENABLE_SHARED})
 
 set(Boost_USE_MULTITHREADED ON)
-find_package(Boost COMPONENTS thread system regex random REQUIRED)
+find_package(Boost COMPONENTS thread system regex random program_options date_time REQUIRED)
 include_directories(${Boost_INCLUDE_DIRS})
 
 find_package(Threads REQUIRED)
index 3337c7e89ae0a9631e973f0302f3d283ffb3784b..79b70c1308cb1467ad0ffe5514fd0092d4391803 100644 (file)
@@ -582,7 +582,7 @@ set(ceph_mon_srcs
   common/TextTable.cc)
 add_executable(ceph-mon ${ceph_mon_srcs} $<TARGET_OBJECTS:heap_profiler_objs>)
 add_dependencies(ceph-mon erasure_code_plugins)
-target_link_libraries(ceph-mon mon boost_thread common os global ${EXTRALIBS}
+      target_link_libraries(ceph-mon mon ${Boost_THREAD_LIBRARY} common os global ${EXTRALIBS}
   ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
 install(TARGETS ceph-mon DESTINATION bin)
 
@@ -744,7 +744,7 @@ if(${WITH_MDS})
     $<TARGET_OBJECTS:heap_profiler_objs>
     $<TARGET_OBJECTS:common_util_obj>)
   target_link_libraries(ceph-mds mds osdc ${CMAKE_DL_LIBS} global
-    ${ALLOC_LIBS} boost_thread)
+    ${ALLOC_LIBS} ${Boost_THREAD_LIBRARY})
   install(TARGETS ceph-mds DESTINATION bin)
 endif(${WITH_MDS})
 
@@ -1018,7 +1018,7 @@ if(${WITH_RBD})
     $<TARGET_OBJECTS:heap_profiler_objs>)
   set_target_properties(rbd PROPERTIES OUTPUT_NAME rbd)
   target_link_libraries(rbd librbd librados global common keyutils udev
-    boost_regex boost_program_options
+    ${Boost_REGEX_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} 
     ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
   install(TARGETS rbd DESTINATION bin)
   install(PROGRAMS ${CMAKE_SOURCE_DIR}/src/ceph-rbdnamer DESTINATION bin)
index c872d5204db202974756ef555379d3da77d522f8..b129e2c5d39c6970c90f3c195165c7fba27b2032 100644 (file)
@@ -114,7 +114,7 @@ add_executable(smalliobench
   ${smalliobench_srcs}
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
-target_link_libraries(smalliobench librados boost_program_options global
+target_link_libraries(smalliobench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
 
 # smalliobenchfs
@@ -128,7 +128,7 @@ add_executable(smalliobenchfs
   ${smalliobenchfs_srcs}
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
-target_link_libraries(smalliobenchfs librados boost_program_options os global
+target_link_libraries(smalliobenchfs librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
 
 # smalliobenchdumb
@@ -142,7 +142,7 @@ add_executable(smalliobenchdumb
   ${smalliobenchdumb_srcs}
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
-target_link_libraries(smalliobenchdumb librados boost_program_options os global
+target_link_libraries(smalliobenchdumb librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
 
 # smalliobenchrbd
@@ -164,7 +164,7 @@ if (${WITH_RBD})
     librados
     os
     global
-    boost_program_options
+    ${Boost_PROGRAM_OPTIONS_LIBRARY}
     blkid
     udev
     ${BLKID_LIBRARIES}
@@ -182,7 +182,7 @@ add_executable(tpbench
   ${tpbench_srcs}
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
-target_link_libraries(tpbench librados boost_program_options os global
+target_link_libraries(tpbench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
 
 # omapbench
@@ -195,7 +195,7 @@ add_executable(omapbench
   )
 target_link_libraries(omapbench
   librados
-  boost_program_options
+  ${Boost_PROGRAM_OPTIONS_LIBRARY}
   os
   global
   ${BLKID_LIBRARIES}
@@ -414,7 +414,7 @@ add_executable(unittest_encoding EXCLUDE_FROM_ALL
   )
 add_test(unittest_encoding unittest_encoding)
 add_dependencies(check unittest_encoding)
-#target_link_libraries(unittest_encoding librados global boost_filesystem
+#target_link_libraries(unittest_encoding librados global ${Boost_FILESYSTEM_LIBRARY}
 target_link_libraries(unittest_encoding cephfs librados pthread rt m ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS} ${UNITTEST_LIBS})
 set_target_properties(unittest_encoding
   PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
@@ -1539,7 +1539,7 @@ if(${WITH_RADOSGW})
     cls_rgw_client
     cls_user_client
     cls_lock_client
-    boost_regex
+    ${Boost_REGEX_LIBRARY}
     ${BLKID_LIBRARIES}
     ${CMAKE_DL_LIBS} ${ALLOC_LIBS} ${UNITTEST_LIBS} ${CRYPTO_LIBS})
   set_target_properties(test_cls_rgw_meta PROPERTIES COMPILE_FLAGS
@@ -1566,7 +1566,7 @@ if(${WITH_RADOSGW})
     cls_rgw_client
     cls_user_client
     cls_lock_client
-    boost_regex
+    ${Boost_REGEX_LIBRARY}
     ${BLKID_LIBRARIES}
     ${CMAKE_DL_LIBS}
     ${ALLOC_LIBS}
@@ -2241,7 +2241,7 @@ add_executable(simple_server
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
 target_link_libraries(simple_server
-  os global common boost_regex
+  os global common ${Boost_REGEX_LIBRARY}
   ${EXTRALIBS}
   ${ALLOC_LIBS}
   ${CMAKE_DL_LIBS}
@@ -2253,7 +2253,7 @@ add_executable(simple_client
   $<TARGET_OBJECTS:heap_profiler_objs>
   )
 target_link_libraries(simple_client
-  os global common boost_regex
+  os global common ${Boost_REGEX_LIBRARY}
   ${EXTRALIBS}
   ${ALLOC_LIBS}
   ${CMAKE_DL_LIBS}
@@ -2266,7 +2266,7 @@ if(HAVE_XIO)
     $<TARGET_OBJECTS:heap_profiler_objs>
     )
   target_link_libraries(xio_server
-    os global common boost_regex
+    os global common ${Boost_REGEX_LIBRARY}
     ${Xio_LIBRARY} ibverbs rdmacm pthread rt
     ${EXTRALIBS}
     ${ALLOC_LIBS}
@@ -2279,7 +2279,7 @@ if(HAVE_XIO)
     $<TARGET_OBJECTS:heap_profiler_objs>
     )
   target_link_libraries(xio_client
-    os global common boost_regex
+    os global common ${Boost_REGEX_LIBRARY}
     ${Xio_LIBRARY} ibverbs rdmacm pthread rt
     ${EXTRALIBS}
     ${ALLOC_LIBS}