Skip to content

Commit

Permalink
test: conditionally-compile libradosstriper tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
  • Loading branch information
Jesse Williamson committed Feb 5, 2018
1 parent 0e1f269 commit 6b2aaef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ endif(WITH_EMBEDDED)
add_subdirectory(libcephfs)
add_subdirectory(librados)
add_subdirectory(librados_test_stub)
if(WITH_LIBRADOSSTRIPER)
add_subdirectory(libradosstriper)
endif(WITH_LIBRADOSSTRIPER)
if(WITH_RBD)
add_subdirectory(librbd)
endif(WITH_RBD)
Expand Down Expand Up @@ -642,12 +644,14 @@ add_ceph_unittest(unittest_workqueue)
target_link_libraries(unittest_workqueue global)

# unittest_striper
add_executable(unittest_striper
test_striper.cc
$<TARGET_OBJECTS:unit-main>
)
add_ceph_unittest(unittest_striper)
target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
if(WITH_LIBRADOSSTRIPER)
add_executable(unittest_striper
test_striper.cc
$<TARGET_OBJECTS:unit-main>
)
add_ceph_unittest(unittest_striper)
target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
endif(WITH_LIBRADOSSTRIPER)

# unittest_prebufferedstreambuf
add_executable(unittest_prebufferedstreambuf
Expand Down
4 changes: 4 additions & 0 deletions src/test/libradosstriper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Note: only compiled if WITH_LIBRADOSSTRIPER is defined.
#

add_library(rados_striper_test STATIC TestCase.cc)
target_link_libraries(rados_striper_test radostest)
set_target_properties(rados_striper_test PROPERTIES COMPILE_FLAGS
Expand Down

0 comments on commit 6b2aaef

Please sign in to comment.