]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Use WITH_TESTS flag to guard the build of ceph-test scripts/binaries
authorRicardo Dias <rdias@suse.com>
Tue, 23 Aug 2016 11:32:47 +0000 (13:32 +0200)
committerRicardo Dias <rdias@suse.com>
Fri, 9 Sep 2016 13:12:44 +0000 (14:12 +0100)
Signed-off-by: Ricardo Dias <rdias@suse.com>
CMakeLists.txt
doc/man/8/CMakeLists.txt
src/CMakeLists.txt
src/rgw/CMakeLists.txt
src/tools/CMakeLists.txt

index 7f861b057a59e444b1297876b0992c2c2e01126a..7aeb4ae6acd5c96fbfb98f850cdbe8afac650634 100644 (file)
@@ -371,6 +371,8 @@ option(HAVE_LIBZFS "LibZFS is enabled" OFF)
 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)
index 4427fbb0f70369dd6049716a77b63facf34ba08f..76bab3a9b35603cdf3f53b684487b44425d476ec 100644 (file)
@@ -13,8 +13,11 @@ set(server_srcs
   ceph-run.rst
   mount.ceph.rst
   ceph-create-keys.rst
-  ceph-rest-api.rst
+  ceph-rest-api.rst)
+if(WITH_TESTS)
+list(APPEND server_srcs
   ceph-debugpack.rst)
+endif(WITH_TESTS)
 
 set(osd_srcs
   ceph-clsinfo.rst
index 4ddc6b9470176d4ca8eb661b0cfd4695101108d8..d0cd125d4134677c0d2bdc1c6fe34f24f1c6e584 100644 (file)
@@ -650,18 +650,21 @@ install(TARGETS ceph-mds DESTINATION bin)
 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)
@@ -675,10 +678,15 @@ configure_file(${CMAKE_SOURCE_DIR}/src/init-ceph.in
 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
index 9014eba81a1a6b31d7753a3421e3966531b4e0b8..2ed17b75476f9ba4206b1ddf7ac829343d76af10 100644 (file)
@@ -1,3 +1,4 @@
+if(WITH_TESTS)
 add_executable(ceph_rgw_jsonparser
   rgw_jsonparser.cc)
 target_link_libraries(ceph_rgw_jsonparser
@@ -14,6 +15,7 @@ install(TARGETS
   ceph_rgw_jsonparser
   ceph_rgw_multiparser
   DESTINATION bin)
+endif(WITH_TESTS)
 
 
 set(rgw_a_srcs
index d5a65ca6822e2e9b71b04331450378ad1fc100d2..ac6ecadedf5be1c084c5866d5280a8bf21b150f2 100644 (file)
@@ -8,6 +8,7 @@ add_executable(rados ${rados_srcs})
 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)
@@ -30,6 +31,7 @@ install(TARGETS ceph-monstore-tool 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
@@ -41,14 +43,18 @@ endif(WITH_FUSE)
 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})
@@ -70,10 +76,12 @@ add_executable(osdmaptool ${osdomaptool_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})