From 19ffa3ea7c6074b720e5bee4cbcfba68096f66f4 Mon Sep 17 00:00:00 2001 From: Pan Liu Date: Mon, 2 Jan 2017 16:43:59 +0800 Subject: [PATCH] spdk: fixed the compilation error for testcases when use spdk v16.12 Signed-off-by: Pan Liu --- src/test/CMakeLists.txt | 2 +- src/test/libcephd/CMakeLists.txt | 5 +++++ src/test/osd/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index a5719da3020..4079cbbe7c3 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -163,7 +163,7 @@ endif(WITH_KVS) # ceph_objectstore_bench add_executable(ceph_objectstore_bench objectstore_bench.cc) -target_link_libraries(ceph_objectstore_bench global ${BLKID_LIBRARIES} os) +target_link_libraries(ceph_objectstore_bench os global ${BLKID_LIBRARIES}) if(${WITH_RADOSGW}) # test_cors diff --git a/src/test/libcephd/CMakeLists.txt b/src/test/libcephd/CMakeLists.txt index cb711ec0ad4..60a28cbb812 100644 --- a/src/test/libcephd/CMakeLists.txt +++ b/src/test/libcephd/CMakeLists.txt @@ -4,6 +4,11 @@ set(cephdtest_srcs add_library(cephdtest STATIC ${cephdtest_srcs}) set_target_properties(cephdtest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) +#Enable spdk +if(HAVE_SPDK) +link_directories("${CMAKE_SOURCE_DIR}/src/spdk/build/lib/") +endif(HAVE_SPDK) + # ceph_test_cephd_api_misc add_executable(ceph_test_cephd_api_misc misc.cc diff --git a/src/test/osd/CMakeLists.txt b/src/test/osd/CMakeLists.txt index 638d2e2cdda..f380fb79ba9 100644 --- a/src/test/osd/CMakeLists.txt +++ b/src/test/osd/CMakeLists.txt @@ -55,7 +55,7 @@ add_executable(unittest_osdscrub $ ) add_ceph_unittest(unittest_osdscrub ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdscrub) -target_link_libraries(unittest_osdscrub osd global ${CMAKE_DL_LIBS} os mon ${BLKID_LIBRARIES}) +target_link_libraries(unittest_osdscrub osd os global ${CMAKE_DL_LIBS} mon ${BLKID_LIBRARIES}) # unittest_pglog add_executable(unittest_pglog -- 2.39.5