option(ENABLE_COVERAGE "Coverage is enabled" OFF)
option(PG_DEBUG_REFS "PG Ref debugging is enabled" OFF)
+option(WITH_TESTS "enable the build of ceph-test package scripts/binaries" ON)
+
if(LINUX)
add_definitions(-D__linux__)
endif(LINUX)
add_subdirectory(erasure-code)
# Support/Tools
+if(WITH_TESTS)
add_subdirectory(googletest/googlemock)
-
add_subdirectory(test)
+endif(WITH_TESTS)
add_subdirectory(compressor)
add_subdirectory(tools)
+if(WITH_TESTS)
configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/src/ceph-debugpack.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY)
+endif(WITH_TESTS)
configure_file(${CMAKE_SOURCE_DIR}/src/ceph.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY)
configure_file(ceph-post-file.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-post-file @ONLY)
+if(WITH_TESTS)
install(PROGRAMS
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage
+ DESTINATION bin)
+endif(WITH_TESTS)
+
+install(PROGRAMS
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crush-location
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-post-file
${CMAKE_SOURCE_DIR}/src/ceph-run
target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} radosstriper)
install(TARGETS rados DESTINATION bin)
+if(WITH_TESTS)
add_executable(ceph_scratchtool scratchtool.c)
target_link_libraries(ceph_scratchtool librados global)
install(TARGETS ceph_scratchtool DESTINATION bin)
install(PROGRAMS
ceph-monstore-update-crush.sh
DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
+endif(WITH_TESTS)
add_executable(ceph-objectstore-tool
ceph_objectstore_tool.cc
install(TARGETS ceph-objectstore-tool DESTINATION bin)
if(WITH_LIBCEPHFS)
+if(WITH_TESTS)
add_executable(ceph-client-debug ceph-client-debug.cc)
target_link_libraries(ceph-client-debug cephfs global client)
install(TARGETS ceph-client-debug DESTINATION bin)
+endif(WITH_TESTS)
endif(WITH_LIBCEPHFS)
+if(WITH_TESTS)
add_executable(ceph-kvstore-tool ceph_kvstore_tool.cc)
target_link_libraries(ceph-kvstore-tool os global)
install(TARGETS ceph-kvstore-tool DESTINATION bin)
+endif(WITH_TESTS)
set(ceph_conf_srcs ceph_conf.cc)
add_executable(ceph-conf ${ceph_conf_srcs})
target_link_libraries(osdmaptool global)
install(TARGETS osdmaptool DESTINATION bin)
+if(WITH_TESTS)
set(ceph_psim_srcs psim.cc)
add_executable(ceph_psim ${ceph_psim_srcs})
target_link_libraries(ceph_psim global)
install(TARGETS ceph_psim DESTINATION bin)
+endif(WITH_TESTS)
set(ceph_authtool_srcs ceph_authtool.cc)
add_executable(ceph-authtool ${ceph_authtool_srcs})