From: Tim Serong Date: Wed, 20 Feb 2019 06:45:31 +0000 (+1100) Subject: src/tools: only build dedup tool if WITH_TESTS is set X-Git-Tag: v14.1.0~33^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26536%2Fhead;p=ceph.git src/tools: only build dedup tool if WITH_TESTS is set 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 --- diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index a799a6c96f19..234f9491a95a 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -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)