]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build: add top-level libraddosstriper conditional
authorJesse Williamson <jwilliamson@suse.de>
Thu, 10 May 2018 23:20:42 +0000 (16:20 -0700)
committerNathan Cutler <ncutler@suse.com>
Sun, 2 Sep 2018 12:30:44 +0000 (14:30 +0200)
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
(cherry picked from commit 5513a90c62f506d251dfebb2c3a871480c36337a)

src/include/config-h.in.cmake
src/test/CMakeLists.txt
src/test/libradosstriper/CMakeLists.txt
src/tools/CMakeLists.txt

index 66ecbfb3d723669e18491eb295d690cf52444c6f..5ce4a2d4d167b90ebe9e47c1d5ad586a20394186 100644 (file)
 /* Defined if boost::context is available */
 #cmakedefine HAVE_BOOST_CONTEXT
 
+/* Defined if libradosstriper is enabled: */
+#cmakedefine WITH_LIBRADOSSTRIPER
+
 /* Defined if OpenSSL is available for the rgw beast frontend */
 #cmakedefine WITH_RADOSGW_BEAST_OPENSSL
 
index 892b87f76ec9ee7d02967c1382dfe8b36e8a4c26..0afc6827510bab6dc990172c551eedafd7757190 100644 (file)
@@ -34,7 +34,9 @@ add_subdirectory(journal)
 add_subdirectory(libcephfs)
 add_subdirectory(librados)
 add_subdirectory(librados_test_stub)
-add_subdirectory(libradosstriper)
+if(WITH_LIBRADOSSTRIPER)
+  add_subdirectory(libradosstriper)
+endif()
 if(WITH_RBD)
   add_subdirectory(librbd)
 endif(WITH_RBD)
@@ -635,12 +637,14 @@ add_ceph_unittest(unittest_workqueue)
 target_link_libraries(unittest_workqueue global)
 
 # unittest_striper
-add_executable(unittest_striper
-  test_striper.cc
-  $<TARGET_OBJECTS:unit-main>
-  )
+if(WITH_LIBRADOSSTRIPER)
+  add_executable(unittest_striper
+    test_striper.cc
+    $<TARGET_OBJECTS:unit-main>
+    )
 add_ceph_unittest(unittest_striper)
 target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
+endif(WITH_LIBRADOSSTRIPER)
 
 # unittest_prebufferedstreambuf
 add_executable(unittest_prebufferedstreambuf
index b328acb31bd789897cbaf135c2712328ca7c68f6..be76b3d285457e4eae4fa519001f739a19801a6e 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Note: only compiled if WITH_LIBRADOSSTRIPER is defined.
+#
 add_library(rados_striper_test STATIC TestCase.cc)
 target_link_libraries(rados_striper_test radostest)
 set_target_properties(rados_striper_test PROPERTIES COMPILE_FLAGS
index e0844ec0c7a1f56928ba383e06264ec6450b86d6..49e6e32645e6645f73fde7e2a76968770625b315 100644 (file)
@@ -7,7 +7,13 @@ set(rados_srcs
   ${PROJECT_SOURCE_DIR}/src/common/obj_bencher.cc
   ${PROJECT_SOURCE_DIR}/src/osd/ECUtil.cc)
 add_executable(rados ${rados_srcs})
-target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} radosstriper)
+
+target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+if(WITH_LIBRADOSSTRIPER)
+target_link_libraries(rados radosstriper)
+else()
+target_link_libraries(rados cls_lock_client)
+endif()
 install(TARGETS rados DESTINATION bin)
 
 if(WITH_TESTS)