]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/tools: only build dedup tool if WITH_TESTS is set 26536/head
authorTim Serong <tserong@suse.com>
Wed, 20 Feb 2019 06:45:31 +0000 (17:45 +1100)
committerTim Serong <tserong@suse.com>
Wed, 20 Feb 2019 07:24:32 +0000 (18:24 +1100)
We need to only build the dedup tool if WITH_TESTS is set.
Otherwise, when building an RPM *without* tests enabled, the build
will fail with "error: Installed (but unpackaged) file(s) found:
/usr/bin/cephdeduptool".

Signed-off-by: Tim Serong <tserong@suse.com>
src/tools/CMakeLists.txt

index a799a6c96f1934b3f2103a951e36eda667a419cb..234f9491a95ad24581aacdf43dd82fb28fea30c3 100644 (file)
@@ -100,10 +100,12 @@ add_executable(ceph-authtool ${ceph_authtool_srcs})
 target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS})
 install(TARGETS ceph-authtool DESTINATION bin)
 
+if(WITH_TESTS)
 set(cephdeduptool_srcs ceph_dedup_tool.cc)
 add_executable(cephdeduptool ${cephdeduptool_srcs})
 target_link_libraries(cephdeduptool librados-cxx global cls_cas_client)
 install(TARGETS cephdeduptool DESTINATION bin)
+endif(WITH_TESTS)
 
 if(WITH_CEPHFS)
   add_subdirectory(cephfs)