From 57cd851df6393e5a846b58ad36d54f2bf1b655f5 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 3 Aug 2015 12:52:58 +0100 Subject: [PATCH] CMake: smalliobenchrbd should dep on rbd Signed-off-by: John Spray --- src/test/CMakeLists.txt | 50 +++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index bc796d608a3..3e6fe305fe0 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -206,31 +206,33 @@ target_link_libraries(smalliobenchdumb librados boost_program_options os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${TCMALLOC_LIBS}) # smalliobenchrbd -set(smalliobenchrbd_srcs - bench/small_io_bench_rbd.cc - bench/rbd_backend.cc - bench/detailed_stat_collector.cc - bench/bencher.cc - ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc - ${CMAKE_SOURCE_DIR}/src/common/secret.c -) -add_executable(smalliobenchrbd - ${smalliobenchrbd_srcs} - $ - ) -target_link_libraries(smalliobenchrbd - librbd - librados - os - global - boost_program_options - blkid - udev - ${BLKID_LIBRARIES} - ${CMAKE_DL_LIBS} - ${TCMALLOC_LIBS} - keyutils +if (${WITH_RBD}) + set(smalliobenchrbd_srcs + bench/small_io_bench_rbd.cc + bench/rbd_backend.cc + bench/detailed_stat_collector.cc + bench/bencher.cc + ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc + ${CMAKE_SOURCE_DIR}/src/common/secret.c ) + add_executable(smalliobenchrbd + ${smalliobenchrbd_srcs} + $ + ) + target_link_libraries(smalliobenchrbd + librbd + librados + os + global + boost_program_options + blkid + udev + ${BLKID_LIBRARIES} + ${CMAKE_DL_LIBS} + ${TCMALLOC_LIBS} + keyutils + ) +endif (${WITH_RBD}) # tpbench set(tpbench_srcs