Skip to content

Commit

Permalink
build: conditionally-compile libradosstriper (cmakedefine)
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
  • Loading branch information
Jesse Williamson committed Oct 16, 2017
1 parent 3141693 commit 4b30d24
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ find_package(dpdk)
set(HAVE_DPDK ${DPDK_FOUND})
endif(WITH_DPDK)

option(WITH_LIBRADOSSTRIPER "Build with libradosstriper support." ON)
if(WITH_LIBRADOSSTRIPER)
message(STATUS "Enabling libradosstriper in \"rados\" tool.")
else()
message(STATUS "Disabling libradosstriper support in \"rados\" tool.")
endif()

option(WITH_BLKIN "Use blkin to emit LTTng tracepoints for Zipkin" OFF)
if(WITH_BLKIN)
set(BLKIN_LIBRARIES blkin lttng-ust)
Expand Down Expand Up @@ -607,5 +614,4 @@ add_tags(ctags
EXCLUDES "*.js" "*.css")
add_custom_target(tags DEPENDS ctags)

option(WITH_LIBRADOSSTRIPER "Build with libradosstriper support." ON)

4 changes: 3 additions & 1 deletion src/include/config-h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
/* Accelio conditional compilation */
#cmakedefine HAVE_XIO


/* AsyncMessenger RDMA conditional compilation */
#cmakedefine HAVE_RDMA

Expand Down Expand Up @@ -324,4 +323,7 @@
/* Defined if getentropy() is available */
#cmakedefine HAVE_GETENTROPY

/* Define if libradosstriper is enabled: */
#cmakedefine WITH_LIBRADOSSTRIPER

#endif /* CONFIG_H */
5 changes: 0 additions & 5 deletions src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ add_executable(rados ${rados_srcs})
target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} radosstriper)
install(TARGETS rados DESTINATION bin)

if(WITH_LIBRADOSSTRIPER)
message(STATUS " Using libradosstriper.")
add_definitions("-DWITH_LIBRADOSSTRIPER")
endif()

if(WITH_TESTS)
add_executable(ceph_scratchtool scratchtool.c)
target_link_libraries(ceph_scratchtool librados global)
Expand Down

0 comments on commit 4b30d24

Please sign in to comment.