]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use boost target instead of libary path while linking against them
authorKefu Chai <kchai@redhat.com>
Sun, 16 Apr 2017 05:02:55 +0000 (13:02 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 14 Jun 2017 03:17:41 +0000 (11:17 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/rbd_replay/CMakeLists.txt
src/rgw/CMakeLists.txt
src/test/CMakeLists.txt
src/test/bench/CMakeLists.txt
src/test/erasure-code/CMakeLists.txt
src/test/librados/CMakeLists.txt
src/tools/CMakeLists.txt

index 8a68c0b4d6ca54953c7ad4256ebec9a2219d6e52..b19d00d779de01fe1a9791eaa4ae557de50c3cd3 100644 (file)
@@ -607,13 +607,13 @@ set(ceph_common_objs
   $<TARGET_OBJECTS:crush_objs>)
 set(ceph_common_deps
   json_spirit erasure_code rt ${LIB_RESOLV}
-  ${Boost_THREAD_LIBRARY}
-  ${Boost_SYSTEM_LIBRARY}
-  ${Boost_REGEX_LIBRARY}
-  ${Boost_RANDOM_LIBRARY}
-  ${Boost_PROGRAM_OPTIONS_LIBRARY}
-  ${Boost_DATE_TIME_LIBRARY}
-  ${Boost_IOSTREAMS_LIBRARY}
+  Boost::thread
+  Boost::system
+  Boost::regex
+  Boost::random
+  Boost::program_options
+  Boost::date_time
+  Boost::iostreams
   ${BLKID_LIBRARIES}
   ${Backtrace_LIBRARIES}
   ${BLKIN_LIBRARIES}
@@ -689,7 +689,7 @@ if (WITH_MGR)
                  $<TARGET_OBJECTS:heap_profiler_objs>)
   target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
   target_link_libraries(ceph-mgr osdc client global-static common
-      ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
+      Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
   install(TARGETS ceph-mgr DESTINATION bin)
 endif (WITH_MGR)
 
@@ -873,7 +873,7 @@ set(ceph_mds_srcs
 add_executable(ceph-mds ${ceph_mds_srcs}
   $<TARGET_OBJECTS:common_util_obj>)
 target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static common
-  ${Boost_THREAD_LIBRARY})
+  Boost::thread)
 install(TARGETS ceph-mds DESTINATION bin)
 
 add_subdirectory(erasure-code)
index a842960a62f2b8f2d2906138f201409d215cb943..100a3ab861b3a435df56716a5eedde4ae8b19d89 100644 (file)
@@ -36,7 +36,7 @@ if(${WITH_BABELTRACE})
     global
     babeltrace
     babeltrace-ctf
-    ${Boost_DATE_TIME_LIBRARY}
+    Boost::date_time
     )
   install(TARGETS rbd-replay-prep DESTINATION bin)
 endif(${WITH_BABELTRACE})
index 2a22e3f1a03d06887815d19498752916201eed03..c6fa7c0bac8863eebe41bc5a4f076457b52a8342 100644 (file)
@@ -172,8 +172,8 @@ add_library(radosgw_a STATIC ${radosgw_srcs}
 target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
 if(WITH_RADOSGW_BEAST_FRONTEND)
   target_link_libraries(radosgw_a
-    ${Boost_COROUTINE_LIBRARY}
-    ${Boost_CONTEXT_LIBRARY})
+    Boost::coroutine
+    Boost::context)
 endif()
 
 add_executable(radosgw rgw_main.cc)
index 080eccf765388516c5d5881d5a72a40ff62d9f18..cf0f028cbad452439185633794dc032d4b99d1c6 100644 (file)
@@ -147,7 +147,7 @@ add_executable(ceph_omapbench
   )
 target_link_libraries(ceph_omapbench
   librados
-  ${Boost_PROGRAM_OPTIONS_LIBRARY}
+  Boost::program_options
   global
   ${BLKID_LIBRARIES}
   ${CMAKE_DL_LIBS}
@@ -201,7 +201,7 @@ if(${WITH_RADOSGW})
     cls_rgw_client
     cls_user_client
     cls_lock_client
-    ${Boost_REGEX_LIBRARY}
+    Boost::regex
     ${BLKID_LIBRARIES}
     ${CURL_LIBRARIES}
     ${EXPAT_LIBRARIES}
@@ -231,7 +231,7 @@ if(${WITH_RADOSGW})
     cls_rgw_client
     cls_user_client
     cls_lock_client
-    ${Boost_REGEX_LIBRARY}
+    Boost::regex
     ${BLKID_LIBRARIES}
     ${CURL_LIBRARIES}
     ${EXPAT_LIBRARIES}
index ce4357fa7d0b5a0fc709669c1a7c5a65ca88bf14..9fba701e0522162c002f3e3b4b2b3910c51e6146 100644 (file)
@@ -8,7 +8,7 @@ set(smalliobench_srcs
 add_executable(ceph_smalliobench
   ${smalliobench_srcs}
   )
-target_link_libraries(ceph_smalliobench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
+target_link_libraries(ceph_smalliobench librados Boost::program_options global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) 
 
 # ceph_smalliobenchrbd
@@ -27,7 +27,7 @@ if(WITH_RBD)
     librados
     os
     global
-    ${Boost_PROGRAM_OPTIONS_LIBRARY}
+    Boost::program_options
     ${BLKID_LIBRARIES}
     ${CMAKE_DL_LIBS}
     )
@@ -50,7 +50,7 @@ set(ceph_smalliobenchfs_srcs
 add_executable(ceph_smalliobenchfs
   ${ceph_smalliobenchfs_srcs}
   )
-target_link_libraries(ceph_smalliobenchfs librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
+target_link_libraries(ceph_smalliobenchfs librados Boost::program_options os global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) 
 
 # ceph_smalliobenchdumb
@@ -63,7 +63,7 @@ set(smalliobenchdumb_srcs
 add_executable(ceph_smalliobenchdumb
   ${smalliobenchdumb_srcs}
   )
-target_link_libraries(ceph_smalliobenchdumb librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
+target_link_libraries(ceph_smalliobenchdumb librados Boost::program_options os global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) 
 
 # ceph_tpbench
@@ -73,7 +73,7 @@ set(tpbench_srcs
 add_executable(ceph_tpbench
   ${tpbench_srcs}
   )
-target_link_libraries(ceph_tpbench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
+target_link_libraries(ceph_tpbench librados Boost::program_options global
   ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
 
 install(TARGETS
index 1c4ca798433f3eb5206294631d74b3f2c6203266..218e6908f95269cf97f897afcb6439a5240819d4 100644 (file)
@@ -6,15 +6,15 @@ add_ceph_test(test-erasure-eio.sh ${CMAKE_CURRENT_SOURCE_DIR}/test-erasure-eio.s
 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 ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_erasure_code_benchmark ceph-common Boost::program_options 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 ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_erasure_code_non_regression ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
 
 add_executable(ceph_erasure_code ceph_erasure_code.cc)
-target_link_libraries(ceph_erasure_code ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_erasure_code ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
 install(TARGETS ceph_erasure_code
   DESTINATION bin)
 
index 2194a3e1fa67c4e024e09661602c5a23c51e45fa..d81ebf256d01e22386fe10d91e6ed08e1c2923c2 100644 (file)
@@ -125,7 +125,7 @@ add_executable(ceph_test_rados_api_tier
 set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS
   ${UNITTEST_CXX_FLAGS})
 target_link_libraries(ceph_test_rados_api_tier
-  global rados_a ${UNITTEST_LIBS} ${Boost_SYSTEM_LIBRARY} radostest)
+  global rados_a ${UNITTEST_LIBS} Boost::system radostest)
 
 # ceph_test_rados_api_snapshots
 add_executable(ceph_test_rados_api_snapshots
index f6336fa594f2f8e2f24b34494e1d4bc6dbe83407..ea241cceef2ae9b66842a1573b4ad43851ad22fb 100644 (file)
@@ -23,11 +23,11 @@ target_link_libraries(ceph_radosacl librados global)
 install(TARGETS ceph_radosacl DESTINATION bin)
 
 add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
-target_link_libraries(ceph-osdomap-tool os global ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
 install(TARGETS ceph-osdomap-tool DESTINATION bin)
 
 add_executable(ceph-monstore-tool ceph_monstore_tool.cc)
-target_link_libraries(ceph-monstore-tool os global ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries(ceph-monstore-tool os global Boost::program_options)
 install(TARGETS ceph-monstore-tool DESTINATION bin)
 install(PROGRAMS
   ceph-monstore-update-crush.sh
@@ -38,7 +38,7 @@ add_executable(ceph-objectstore-tool
   ceph_objectstore_tool.cc
   rebuild_mondb.cc
   RadosDump.cc)
-target_link_libraries(ceph-objectstore-tool osd os global ${Boost_PROGRAM_OPTIONS_LIBRARY} ${CMAKE_DL_LIBS})
+target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
 if(WITH_FUSE)
   target_link_libraries(ceph-objectstore-tool fuse)
 endif(WITH_FUSE)