cmake: always use CMAKE_RUNTIME_OUTPUT_DIRECTORY as the unittests' path

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-10-03 21:15:50 +08:00
parent dd9b340b70
commit 2f4cc32741
18 changed files with 136 additions and 145 deletions

View File

@ -22,8 +22,8 @@ function(add_ceph_test test_name test_path)
endfunction() endfunction()
#sets uniform compiler flags and link libraries #sets uniform compiler flags and link libraries
function(add_ceph_unittest unittest_name unittest_path) function(add_ceph_unittest unittest_name)
add_ceph_test(${unittest_name} ${unittest_path}) add_ceph_test(${unittest_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${unittest_name})
target_link_libraries(${unittest_name} ${UNITTEST_LIBS}) target_link_libraries(${unittest_name} ${UNITTEST_LIBS})
set_target_properties(${unittest_name} PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) set_target_properties(${unittest_name} PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
endfunction() endfunction()

View File

@ -602,21 +602,21 @@ add_executable(unittest_admin_socket
admin_socket.cc admin_socket.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_admin_socket ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_admin_socket) add_ceph_unittest(unittest_admin_socket)
target_link_libraries(unittest_admin_socket global) target_link_libraries(unittest_admin_socket global)
# unittest_encoding # unittest_encoding
add_executable(unittest_encoding add_executable(unittest_encoding
encoding.cc encoding.cc
) )
add_ceph_unittest(unittest_encoding ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_encoding) add_ceph_unittest(unittest_encoding)
target_link_libraries(unittest_encoding ceph-common librados ${XIO_LIBRARY} pthread rt m ${BLKID_LIBRARIES}) target_link_libraries(unittest_encoding ceph-common librados ${XIO_LIBRARY} pthread rt m ${BLKID_LIBRARIES})
# unittest_addrs # unittest_addrs
add_executable(unittest_addrs add_executable(unittest_addrs
test_addrs.cc test_addrs.cc
) )
add_ceph_unittest(unittest_addrs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_addrs) add_ceph_unittest(unittest_addrs)
target_link_libraries(unittest_addrs ceph-common librados ${XIO_LIBRARY} pthread rt m ${BLKID_LIBRARIES}) target_link_libraries(unittest_addrs ceph-common librados ${XIO_LIBRARY} pthread rt m ${BLKID_LIBRARIES})
# unittest_workqueue # unittest_workqueue
@ -624,7 +624,7 @@ add_executable(unittest_workqueue
test_workqueue.cc test_workqueue.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_workqueue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_workqueue) add_ceph_unittest(unittest_workqueue)
target_link_libraries(unittest_workqueue global ${BLKID_LIBRARIES}) target_link_libraries(unittest_workqueue global ${BLKID_LIBRARIES})
# unittest_striper # unittest_striper
@ -632,49 +632,49 @@ add_executable(unittest_striper
test_striper.cc test_striper.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_striper ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_striper) add_ceph_unittest(unittest_striper)
target_link_libraries(unittest_striper global ${BLKID_LIBRARIES}) target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
# unittest_prebufferedstreambuf # unittest_prebufferedstreambuf
add_executable(unittest_prebufferedstreambuf add_executable(unittest_prebufferedstreambuf
test_prebufferedstreambuf.cc test_prebufferedstreambuf.cc
) )
add_ceph_unittest(unittest_prebufferedstreambuf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_prebufferedstreambuf) add_ceph_unittest(unittest_prebufferedstreambuf)
target_link_libraries(unittest_prebufferedstreambuf global ${BLKID_LIBRARIES}) target_link_libraries(unittest_prebufferedstreambuf global ${BLKID_LIBRARIES})
# unittest_str_list # unittest_str_list
add_executable(unittest_str_list add_executable(unittest_str_list
test_str_list.cc test_str_list.cc
) )
add_ceph_unittest(unittest_str_list ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_str_list) add_ceph_unittest(unittest_str_list)
target_link_libraries(unittest_str_list global ${BLKID_LIBRARIES}) target_link_libraries(unittest_str_list global ${BLKID_LIBRARIES})
# unittest_log # unittest_log
add_executable(unittest_log add_executable(unittest_log
${CMAKE_SOURCE_DIR}/src/log/test.cc ${CMAKE_SOURCE_DIR}/src/log/test.cc
) )
add_ceph_unittest(unittest_log ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_log) add_ceph_unittest(unittest_log)
target_link_libraries(unittest_log global) target_link_libraries(unittest_log global)
# unittest_base64 # unittest_base64
add_executable(unittest_base64 add_executable(unittest_base64
base64.cc base64.cc
) )
add_ceph_unittest(unittest_base64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_base64) add_ceph_unittest(unittest_base64)
target_link_libraries(unittest_base64 global) target_link_libraries(unittest_base64 global)
# unittest_ceph_argparse # unittest_ceph_argparse
add_executable(unittest_ceph_argparse add_executable(unittest_ceph_argparse
ceph_argparse.cc ceph_argparse.cc
) )
add_ceph_unittest(unittest_ceph_argparse ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_argparse) add_ceph_unittest(unittest_ceph_argparse)
target_link_libraries(unittest_ceph_argparse global) target_link_libraries(unittest_ceph_argparse global)
# unittest_ceph_compatset # unittest_ceph_compatset
add_executable(unittest_ceph_compatset add_executable(unittest_ceph_compatset
ceph_compatset.cc ceph_compatset.cc
) )
add_ceph_unittest(unittest_ceph_compatset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_compatset) add_ceph_unittest(unittest_ceph_compatset)
target_link_libraries(unittest_ceph_compatset global) target_link_libraries(unittest_ceph_compatset global)
# unittest_gather # unittest_gather
@ -682,14 +682,14 @@ add_executable(unittest_gather
gather.cc gather.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_gather ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_gather) add_ceph_unittest(unittest_gather)
target_link_libraries(unittest_gather global) target_link_libraries(unittest_gather global)
# unittest_run_cmd # unittest_run_cmd
add_executable(unittest_run_cmd add_executable(unittest_run_cmd
run_cmd.cc run_cmd.cc
) )
add_ceph_unittest(unittest_run_cmd ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_run_cmd) add_ceph_unittest(unittest_run_cmd)
target_link_libraries(unittest_run_cmd global) target_link_libraries(unittest_run_cmd global)
# signals # signals
@ -697,28 +697,28 @@ add_executable(unittest_signals
signals.cc signals.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_signals ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_signals) add_ceph_unittest(unittest_signals)
target_link_libraries(unittest_signals global) target_link_libraries(unittest_signals global)
# unittest_simple_spin # unittest_simple_spin
add_executable(unittest_simple_spin add_executable(unittest_simple_spin
simple_spin.cc simple_spin.cc
) )
add_ceph_unittest(unittest_simple_spin ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_simple_spin) add_ceph_unittest(unittest_simple_spin)
target_link_libraries(unittest_simple_spin global) target_link_libraries(unittest_simple_spin global)
# unittest_bufferlist # unittest_bufferlist
add_executable(unittest_bufferlist add_executable(unittest_bufferlist
bufferlist.cc bufferlist.cc
) )
add_ceph_unittest(unittest_bufferlist ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bufferlist) add_ceph_unittest(unittest_bufferlist)
target_link_libraries(unittest_bufferlist global) target_link_libraries(unittest_bufferlist global)
# unittest_xlist # unittest_xlist
add_executable(unittest_xlist add_executable(unittest_xlist
test_xlist.cc test_xlist.cc
) )
add_ceph_unittest(unittest_xlist ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_xlist) add_ceph_unittest(unittest_xlist)
target_link_libraries(unittest_xlist ceph-common ${XIO_LIBRARY}) target_link_libraries(unittest_xlist ceph-common ${XIO_LIBRARY})
# unittest_arch # unittest_arch
@ -726,28 +726,28 @@ add_executable(unittest_arch
test_arch.cc test_arch.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_arch ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_arch) add_ceph_unittest(unittest_arch)
target_link_libraries(unittest_arch global) target_link_libraries(unittest_arch global)
# unittest_denc # unittest_denc
add_executable(unittest_denc add_executable(unittest_denc
test_denc.cc test_denc.cc
) )
add_ceph_unittest(unittest_denc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_denc) add_ceph_unittest(unittest_denc)
target_link_libraries(unittest_denc os global) target_link_libraries(unittest_denc os global)
# unittest_mempool # unittest_mempool
add_executable(unittest_mempool add_executable(unittest_mempool
test_mempool.cc test_mempool.cc
) )
add_ceph_unittest(unittest_mempool ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mempool) add_ceph_unittest(unittest_mempool)
target_link_libraries(unittest_mempool global) target_link_libraries(unittest_mempool global)
# unittest_features # unittest_features
add_executable(unittest_features add_executable(unittest_features
test_features.cc test_features.cc
) )
add_ceph_unittest(unittest_features ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_features) add_ceph_unittest(unittest_features)
target_link_libraries(unittest_features global) target_link_libraries(unittest_features global)
# unittest_crypto # unittest_crypto
@ -755,63 +755,63 @@ add_executable(unittest_crypto
crypto.cc crypto.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_crypto ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crypto) add_ceph_unittest(unittest_crypto)
target_link_libraries(unittest_crypto global) target_link_libraries(unittest_crypto global)
# unittest_crypto_init # unittest_crypto_init
add_executable(unittest_crypto_init add_executable(unittest_crypto_init
crypto_init.cc crypto_init.cc
) )
add_ceph_unittest(unittest_crypto_init ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crypto_init) add_ceph_unittest(unittest_crypto_init)
target_link_libraries(unittest_crypto_init global) target_link_libraries(unittest_crypto_init global)
# unittest_perf_counters # unittest_perf_counters
add_executable(unittest_perf_counters add_executable(unittest_perf_counters
perf_counters.cc perf_counters.cc
) )
add_ceph_unittest(unittest_perf_counters ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_perf_counters) add_ceph_unittest(unittest_perf_counters)
target_link_libraries(unittest_perf_counters global) target_link_libraries(unittest_perf_counters global)
# unittest_ceph_crypto # unittest_ceph_crypto
add_executable(unittest_ceph_crypto add_executable(unittest_ceph_crypto
ceph_crypto.cc ceph_crypto.cc
) )
add_ceph_unittest(unittest_ceph_crypto ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_crypto) add_ceph_unittest(unittest_ceph_crypto)
target_link_libraries(unittest_ceph_crypto global) target_link_libraries(unittest_ceph_crypto global)
# unittest_utf8 # unittest_utf8
add_executable(unittest_utf8 add_executable(unittest_utf8
utf8.cc utf8.cc
) )
add_ceph_unittest(unittest_utf8 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_utf8) add_ceph_unittest(unittest_utf8)
target_link_libraries(unittest_utf8 global) target_link_libraries(unittest_utf8 global)
# unittest_mime # unittest_mime
add_executable(unittest_mime add_executable(unittest_mime
mime.cc mime.cc
) )
add_ceph_unittest(unittest_mime ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mime) add_ceph_unittest(unittest_mime)
target_link_libraries(unittest_mime global) target_link_libraries(unittest_mime global)
# unittest_escape # unittest_escape
add_executable(unittest_escape add_executable(unittest_escape
escape.cc escape.cc
) )
add_ceph_unittest(unittest_escape ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_escape) add_ceph_unittest(unittest_escape)
target_link_libraries(unittest_escape global) target_link_libraries(unittest_escape global)
# unittest_strtol # unittest_strtol
add_executable(unittest_strtol add_executable(unittest_strtol
strtol.cc strtol.cc
) )
add_ceph_unittest(unittest_strtol ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_strtol) add_ceph_unittest(unittest_strtol)
target_link_libraries(unittest_strtol global) target_link_libraries(unittest_strtol global)
# unittest_confutils # unittest_confutils
add_executable(unittest_confutils add_executable(unittest_confutils
confutils.cc confutils.cc
) )
add_ceph_unittest(unittest_confutils ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_confutils) add_ceph_unittest(unittest_confutils)
target_link_libraries(unittest_confutils global) target_link_libraries(unittest_confutils global)
# unittest_heartbeatmap # unittest_heartbeatmap
@ -819,7 +819,7 @@ add_executable(unittest_heartbeatmap
heartbeat_map.cc heartbeat_map.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_heartbeatmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_heartbeatmap) add_ceph_unittest(unittest_heartbeatmap)
target_link_libraries(unittest_heartbeatmap global ceph-common) target_link_libraries(unittest_heartbeatmap global ceph-common)
if(${WITH_RADOSGW}) if(${WITH_RADOSGW})
@ -828,7 +828,7 @@ if(${WITH_RADOSGW})
formatter.cc formatter.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_formatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_formatter) add_ceph_unittest(unittest_formatter)
target_link_libraries(unittest_formatter global) target_link_libraries(unittest_formatter global)
endif(${WITH_RADOSGW}) endif(${WITH_RADOSGW})
@ -837,7 +837,7 @@ add_executable(unittest_daemon_config
daemon_config.cc daemon_config.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_daemon_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_daemon_config) add_ceph_unittest(unittest_daemon_config)
target_link_libraries(unittest_daemon_config target_link_libraries(unittest_daemon_config
ceph-common ceph-common
global global
@ -850,7 +850,7 @@ if(WITH_LIBCEPHFS)
add_executable(unittest_libcephfs_config add_executable(unittest_libcephfs_config
libcephfs_config.cc libcephfs_config.cc
) )
add_ceph_unittest(unittest_libcephfs_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_libcephfs_config) add_ceph_unittest(unittest_libcephfs_config)
target_link_libraries(unittest_libcephfs_config cephfs) target_link_libraries(unittest_libcephfs_config cephfs)
endif(WITH_LIBCEPHFS) endif(WITH_LIBCEPHFS)
@ -858,7 +858,7 @@ if(WITH_RBD)
# unittest_rbd_replay # unittest_rbd_replay
add_executable(unittest_rbd_replay add_executable(unittest_rbd_replay
test_rbd_replay.cc) test_rbd_replay.cc)
add_ceph_unittest(unittest_rbd_replay ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_replay) add_ceph_unittest(unittest_rbd_replay)
target_link_libraries(unittest_rbd_replay target_link_libraries(unittest_rbd_replay
librbd librbd
librados librados
@ -872,7 +872,7 @@ endif(WITH_RBD)
# unittest_ipaddr # unittest_ipaddr
add_executable(unittest_ipaddr add_executable(unittest_ipaddr
test_ipaddr.cc) test_ipaddr.cc)
add_ceph_unittest(unittest_ipaddr ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ipaddr) add_ceph_unittest(unittest_ipaddr)
target_link_libraries(unittest_ipaddr mon global) target_link_libraries(unittest_ipaddr mon global)
# unittest_texttable # unittest_texttable
@ -880,26 +880,26 @@ add_executable(unittest_texttable
test_texttable.cc test_texttable.cc
$<TARGET_OBJECTS:common_texttable_obj> $<TARGET_OBJECTS:common_texttable_obj>
) )
add_ceph_unittest(unittest_texttable ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_texttable) add_ceph_unittest(unittest_texttable)
target_link_libraries(unittest_texttable mon global) target_link_libraries(unittest_texttable mon global)
# unittest_on_exit # unittest_on_exit
add_executable(unittest_on_exit add_executable(unittest_on_exit
on_exit.cc on_exit.cc
) )
add_ceph_unittest(unittest_on_exit ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_on_exit) add_ceph_unittest(unittest_on_exit)
target_link_libraries(unittest_on_exit global) target_link_libraries(unittest_on_exit global)
# unittest_subprocess # unittest_subprocess
add_executable(unittest_subprocess add_executable(unittest_subprocess
test_subprocess.cc test_subprocess.cc
) )
add_ceph_unittest(unittest_subprocess ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_subprocess) add_ceph_unittest(unittest_subprocess)
target_link_libraries(unittest_subprocess global) target_link_libraries(unittest_subprocess global)
# unittest_pageset # unittest_pageset
add_executable(unittest_pageset test_pageset.cc) add_executable(unittest_pageset test_pageset.cc)
add_ceph_unittest(unittest_pageset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pageset) add_ceph_unittest(unittest_pageset)
target_link_libraries(unittest_pageset global) target_link_libraries(unittest_pageset global)
#make check ends here #make check ends here

View File

@ -5,7 +5,7 @@ add_executable(ceph_test_object_map
) )
set_target_properties(ceph_test_object_map PROPERTIES COMPILE_FLAGS set_target_properties(ceph_test_object_map PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS}) ${UNITTEST_CXX_FLAGS})
add_ceph_unittest(ceph_test_object_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph_test_object_map) add_ceph_unittest(ceph_test_object_map)
target_link_libraries(ceph_test_object_map target_link_libraries(ceph_test_object_map
os os
ceph-common ceph-common

View File

@ -17,7 +17,7 @@ if(HAVE_BLKID)
add_executable(unittest_blkdev add_executable(unittest_blkdev
test_blkdev.cc test_blkdev.cc
) )
add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev) add_ceph_unittest(unittest_blkdev)
target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES}) target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES})
endif() endif()
@ -25,34 +25,34 @@ endif()
add_executable(unittest_bloom_filter add_executable(unittest_bloom_filter
test_bloom_filter.cc test_bloom_filter.cc
) )
add_ceph_unittest(unittest_bloom_filter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bloom_filter) add_ceph_unittest(unittest_bloom_filter)
target_link_libraries(unittest_bloom_filter ceph-common) target_link_libraries(unittest_bloom_filter ceph-common)
# unittest_histogram # unittest_histogram
add_executable(unittest_histogram add_executable(unittest_histogram
histogram.cc histogram.cc
) )
add_ceph_unittest(unittest_histogram ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_histogram) add_ceph_unittest(unittest_histogram)
target_link_libraries(unittest_histogram ceph-common) target_link_libraries(unittest_histogram ceph-common)
# unittest_prioritized_queue # unittest_prioritized_queue
add_executable(unittest_prioritized_queue add_executable(unittest_prioritized_queue
test_prioritized_queue.cc test_prioritized_queue.cc
) )
add_ceph_unittest(unittest_prioritized_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_prioritized_queue) add_ceph_unittest(unittest_prioritized_queue)
# unittest_mclock_priority_queue # unittest_mclock_priority_queue
add_executable(unittest_mclock_priority_queue add_executable(unittest_mclock_priority_queue
test_mclock_priority_queue.cc test_mclock_priority_queue.cc
) )
add_ceph_unittest(unittest_mclock_priority_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mclock_priority_queue) add_ceph_unittest(unittest_mclock_priority_queue)
target_link_libraries(unittest_mclock_priority_queue ceph-common dmclock) target_link_libraries(unittest_mclock_priority_queue ceph-common dmclock)
# unittest_str_map # unittest_str_map
add_executable(unittest_str_map add_executable(unittest_str_map
test_str_map.cc test_str_map.cc
) )
add_ceph_unittest(unittest_str_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_str_map) add_ceph_unittest(unittest_str_map)
target_link_libraries(unittest_str_map ceph-common) target_link_libraries(unittest_str_map ceph-common)
# unittest_sharedptr_registry # unittest_sharedptr_registry
@ -60,7 +60,7 @@ add_executable(unittest_sharedptr_registry
test_sharedptr_registry.cc test_sharedptr_registry.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_sharedptr_registry ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_sharedptr_registry) add_ceph_unittest(unittest_sharedptr_registry)
target_link_libraries(unittest_sharedptr_registry global) target_link_libraries(unittest_sharedptr_registry global)
# unittest_shared_cache # unittest_shared_cache
@ -68,14 +68,14 @@ add_executable(unittest_shared_cache
test_shared_cache.cc test_shared_cache.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_shared_cache ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_shared_cache) add_ceph_unittest(unittest_shared_cache)
target_link_libraries(unittest_shared_cache global) target_link_libraries(unittest_shared_cache global)
# unittest_sloppy_crc_map # unittest_sloppy_crc_map
add_executable(unittest_sloppy_crc_map add_executable(unittest_sloppy_crc_map
test_sloppy_crc_map.cc test_sloppy_crc_map.cc
) )
add_ceph_unittest(unittest_sloppy_crc_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_sloppy_crc_map) add_ceph_unittest(unittest_sloppy_crc_map)
target_link_libraries(unittest_sloppy_crc_map global) target_link_libraries(unittest_sloppy_crc_map global)
# unittest_time # unittest_time
@ -83,7 +83,7 @@ add_executable(unittest_time
test_time.cc test_time.cc
${CMAKE_SOURCE_DIR}/src/common/ceph_time.cc ${CMAKE_SOURCE_DIR}/src/common/ceph_time.cc
) )
add_ceph_unittest(unittest_time ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_time) add_ceph_unittest(unittest_time)
target_link_libraries(unittest_time ceph-common) target_link_libraries(unittest_time ceph-common)
# unittest_util # unittest_util
@ -91,42 +91,42 @@ add_executable(unittest_util
test_util.cc test_util.cc
${CMAKE_SOURCE_DIR}/src/common/util.cc ${CMAKE_SOURCE_DIR}/src/common/util.cc
) )
add_ceph_unittest(unittest_util ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_util) add_ceph_unittest(unittest_util)
target_link_libraries(unittest_util global) target_link_libraries(unittest_util global)
# unittest_random # unittest_random
add_executable(unittest_random add_executable(unittest_random
test_random.cc test_random.cc
) )
add_ceph_unittest(unittest_random ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_random) add_ceph_unittest(unittest_random)
# unittest_throttle # unittest_throttle
add_executable(unittest_throttle add_executable(unittest_throttle
Throttle.cc Throttle.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_throttle ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_throttle) add_ceph_unittest(unittest_throttle)
target_link_libraries(unittest_throttle global) target_link_libraries(unittest_throttle global)
# unittest_lru # unittest_lru
add_executable(unittest_lru add_executable(unittest_lru
test_lru.cc test_lru.cc
) )
add_ceph_unittest(unittest_lru ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_lru) add_ceph_unittest(unittest_lru)
target_link_libraries(unittest_lru ceph-common) target_link_libraries(unittest_lru ceph-common)
# unittest_io_priority # unittest_io_priority
add_executable(unittest_io_priority add_executable(unittest_io_priority
test_io_priority.cc test_io_priority.cc
) )
add_ceph_unittest(unittest_io_priority ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_io_priority) add_ceph_unittest(unittest_io_priority)
target_link_libraries(unittest_io_priority ceph-common) target_link_libraries(unittest_io_priority ceph-common)
# unittest_crc32c # unittest_crc32c
add_executable(unittest_crc32c add_executable(unittest_crc32c
test_crc32c.cc test_crc32c.cc
) )
add_ceph_unittest(unittest_crc32c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crc32c) add_ceph_unittest(unittest_crc32c)
target_link_libraries(unittest_crc32c ceph-common) target_link_libraries(unittest_crc32c ceph-common)
# unittest_config # unittest_config
@ -134,55 +134,55 @@ add_executable(unittest_config
test_config.cc test_config.cc
test_hostname.cc test_hostname.cc
) )
add_ceph_unittest(unittest_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_config) add_ceph_unittest(unittest_config)
target_link_libraries(unittest_config ceph-common) target_link_libraries(unittest_config ceph-common)
# unittest_context # unittest_context
add_executable(unittest_context add_executable(unittest_context
test_context.cc test_context.cc
) )
add_ceph_unittest(unittest_context ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_context) add_ceph_unittest(unittest_context)
target_link_libraries(unittest_context ceph-common) target_link_libraries(unittest_context ceph-common)
# unittest_safe_io # unittest_safe_io
add_executable(unittest_safe_io add_executable(unittest_safe_io
test_safe_io.cc test_safe_io.cc
) )
add_ceph_unittest(unittest_safe_io ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_safe_io) add_ceph_unittest(unittest_safe_io)
target_link_libraries(unittest_safe_io ceph-common) target_link_libraries(unittest_safe_io ceph-common)
# unittest_url_escape # unittest_url_escape
add_executable(unittest_url_escape add_executable(unittest_url_escape
test_url_escape.cc test_url_escape.cc
) )
add_ceph_unittest(unittest_url_escape ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_url_escape) add_ceph_unittest(unittest_url_escape)
target_link_libraries(unittest_url_escape ceph-common) target_link_libraries(unittest_url_escape ceph-common)
# unittest_readahead # unittest_readahead
add_executable(unittest_readahead add_executable(unittest_readahead
Readahead.cc Readahead.cc
) )
add_ceph_unittest(unittest_readahead ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_readahead) add_ceph_unittest(unittest_readahead)
target_link_libraries(unittest_readahead ceph-common) target_link_libraries(unittest_readahead ceph-common)
# unittest_tableformatter # unittest_tableformatter
add_executable(unittest_tableformatter add_executable(unittest_tableformatter
test_tableformatter.cc test_tableformatter.cc
) )
add_ceph_unittest(unittest_tableformatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_tableformatter) add_ceph_unittest(unittest_tableformatter)
target_link_libraries(unittest_tableformatter ceph-common) target_link_libraries(unittest_tableformatter ceph-common)
add_executable(unittest_xmlformatter add_executable(unittest_xmlformatter
test_xmlformatter.cc test_xmlformatter.cc
) )
add_ceph_unittest(unittest_xmlformatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_xmlformatter) add_ceph_unittest(unittest_xmlformatter)
target_link_libraries(unittest_xmlformatter ceph-common) target_link_libraries(unittest_xmlformatter ceph-common)
# unittest_bit_vector # unittest_bit_vector
add_executable(unittest_bit_vector add_executable(unittest_bit_vector
test_bit_vector.cc test_bit_vector.cc
) )
add_ceph_unittest(unittest_bit_vector ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bit_vector) add_ceph_unittest(unittest_bit_vector)
target_link_libraries(unittest_bit_vector ceph-common) target_link_libraries(unittest_bit_vector ceph-common)
# unittest_async_compressor # unittest_async_compressor
@ -197,48 +197,48 @@ set_target_properties(unittest_async_compressor PROPERTIES COMPILE_FLAGS ${UNITT
add_executable(unittest_interval_map add_executable(unittest_interval_map
test_interval_map.cc test_interval_map.cc
) )
add_ceph_unittest(unittest_interval_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_interval_map) add_ceph_unittest(unittest_interval_map)
target_link_libraries(unittest_interval_map ceph-common) target_link_libraries(unittest_interval_map ceph-common)
# unittest_interval_set # unittest_interval_set
add_executable(unittest_interval_set add_executable(unittest_interval_set
test_interval_set.cc test_interval_set.cc
) )
add_ceph_unittest(unittest_interval_set ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_interval_set) add_ceph_unittest(unittest_interval_set)
target_link_libraries(unittest_interval_set ceph-common) target_link_libraries(unittest_interval_set ceph-common)
# unittest_weighted_priority_queue # unittest_weighted_priority_queue
add_executable(unittest_weighted_priority_queue add_executable(unittest_weighted_priority_queue
test_weighted_priority_queue.cc test_weighted_priority_queue.cc
) )
add_ceph_unittest(unittest_weighted_priority_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_weighted_priority_queue) add_ceph_unittest(unittest_weighted_priority_queue)
# unittest_mutex_debug # unittest_mutex_debug
add_executable(unittest_mutex_debug add_executable(unittest_mutex_debug
test_mutex_debug.cc test_mutex_debug.cc
) )
add_ceph_unittest(unittest_mutex_debug ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mutex_debug) add_ceph_unittest(unittest_mutex_debug)
target_link_libraries(unittest_mutex_debug ceph-common) target_link_libraries(unittest_mutex_debug ceph-common)
# unittest_mutex # unittest_mutex
add_executable(unittest_mutex add_executable(unittest_mutex
test_mutex.cc test_mutex.cc
) )
add_ceph_unittest(unittest_mutex ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mutex) add_ceph_unittest(unittest_mutex)
target_link_libraries(unittest_mutex ceph-common) target_link_libraries(unittest_mutex ceph-common)
# unittest_shunique_lock # unittest_shunique_lock
add_executable(unittest_shunique_lock add_executable(unittest_shunique_lock
test_shunique_lock.cc test_shunique_lock.cc
) )
add_ceph_unittest(unittest_shunique_lock ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_shunique_lock) add_ceph_unittest(unittest_shunique_lock)
target_link_libraries(unittest_shunique_lock ceph-common) target_link_libraries(unittest_shunique_lock ceph-common)
# unittest_perf_histogram # unittest_perf_histogram
add_executable(unittest_perf_histogram add_executable(unittest_perf_histogram
test_perf_histogram.cc test_perf_histogram.cc
) )
add_ceph_unittest(unittest_perf_histogram ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_perf_histogram) add_ceph_unittest(unittest_perf_histogram)
target_link_libraries(unittest_perf_histogram ceph-common) target_link_libraries(unittest_perf_histogram ceph-common)
# unittest_global_doublefree # unittest_global_doublefree
@ -246,7 +246,7 @@ if(WITH_CEPHFS)
add_executable(unittest_global_doublefree add_executable(unittest_global_doublefree
test_global_doublefree.cc test_global_doublefree.cc
) )
add_ceph_unittest(unittest_global_doublefree ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_global_doublefree) add_ceph_unittest(unittest_global_doublefree)
target_link_libraries(unittest_global_doublefree cephfs librados) target_link_libraries(unittest_global_doublefree cephfs librados)
endif(WITH_CEPHFS) endif(WITH_CEPHFS)
@ -254,29 +254,24 @@ add_executable(unittest_dns_resolve
dns_resolve.cc dns_resolve.cc
$<TARGET_OBJECTS:unit-main>) $<TARGET_OBJECTS:unit-main>)
target_link_libraries(unittest_dns_resolve global) target_link_libraries(unittest_dns_resolve global)
add_ceph_unittest(unittest_dns_resolve add_ceph_unittest(unittest_dns_resolve)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_dns_resolve)
add_executable(unittest_back_trace add_executable(unittest_back_trace
test_back_trace.cc) test_back_trace.cc)
set_source_files_properties(test_back_trace.cc PROPERTIES set_source_files_properties(test_back_trace.cc PROPERTIES
COMPILE_FLAGS -fno-inline) COMPILE_FLAGS -fno-inline)
target_link_libraries(unittest_back_trace ceph-common) target_link_libraries(unittest_back_trace ceph-common)
add_ceph_unittest(unittest_back_trace add_ceph_unittest(unittest_back_trace)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_back_trace)
add_executable(unittest_hostname add_executable(unittest_hostname
test_hostname.cc) test_hostname.cc)
target_link_libraries(unittest_hostname ceph-common) target_link_libraries(unittest_hostname ceph-common)
add_ceph_unittest(unittest_hostname add_ceph_unittest(unittest_hostname)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_hostname)
add_executable(unittest_iso_8601 add_executable(unittest_iso_8601
test_iso_8601.cc) test_iso_8601.cc)
target_link_libraries(unittest_iso_8601 ceph-common) target_link_libraries(unittest_iso_8601 ceph-common)
add_ceph_unittest(unittest_iso_8601 add_ceph_unittest(unittest_iso_8601)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_iso_8601)
add_executable(unittest_backport14 test_backport14.cc) add_executable(unittest_backport14 test_backport14.cc)
add_ceph_unittest(unittest_backport14 add_ceph_unittest(unittest_backport14)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_backport14)

View File

@ -5,6 +5,6 @@ add_executable(unittest_compression
test_compression.cc test_compression.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_compression ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_compression) add_ceph_unittest(unittest_compression)
target_link_libraries(unittest_compression global) target_link_libraries(unittest_compression global)
add_dependencies(unittest_compression ceph_example) add_dependencies(unittest_compression ceph_example)

View File

@ -1,7 +1,7 @@
# unittest_crush_wrapper # unittest_crush_wrapper
add_executable(unittest_crush_wrapper add_executable(unittest_crush_wrapper
CrushWrapper.cc) CrushWrapper.cc)
add_ceph_unittest(unittest_crush_wrapper ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crush_wrapper) add_ceph_unittest(unittest_crush_wrapper)
target_link_libraries(unittest_crush_wrapper global ${BLKID_LIBRARIES}) target_link_libraries(unittest_crush_wrapper global ${BLKID_LIBRARIES})
# unittest_crush # unittest_crush
@ -9,7 +9,7 @@ add_executable(unittest_crush
crush.cc crush.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_crush ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crush) add_ceph_unittest(unittest_crush)
target_link_libraries(unittest_crush global m ${BLKID_LIBRARIES}) target_link_libraries(unittest_crush global m ${BLKID_LIBRARIES})
add_ceph_test(crush_weights.sh ${CMAKE_CURRENT_SOURCE_DIR}/crush_weights.sh) add_ceph_test(crush_weights.sh ${CMAKE_CURRENT_SOURCE_DIR}/crush_weights.sh)

View File

@ -1,4 +1,4 @@
# unittest_direct_messenger # unittest_direct_messenger
add_executable(unittest_direct_messenger test_direct_messenger.cc DirectMessenger.cc) add_executable(unittest_direct_messenger test_direct_messenger.cc DirectMessenger.cc)
add_ceph_unittest(unittest_direct_messenger ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_direct_messenger) add_ceph_unittest(unittest_direct_messenger)
target_link_libraries(unittest_direct_messenger global) target_link_libraries(unittest_direct_messenger global)

View File

@ -46,7 +46,7 @@ add_executable(unittest_erasure_code_plugin
TestErasureCodePlugin.cc TestErasureCodePlugin.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_plugin ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_plugin) add_ceph_unittest(unittest_erasure_code_plugin)
target_link_libraries(unittest_erasure_code_plugin target_link_libraries(unittest_erasure_code_plugin
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -67,7 +67,7 @@ add_executable(unittest_erasure_code
TestErasureCode.cc TestErasureCode.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code) add_ceph_unittest(unittest_erasure_code)
target_link_libraries(unittest_erasure_code target_link_libraries(unittest_erasure_code
global global
ceph-common ceph-common
@ -78,7 +78,7 @@ add_executable(unittest_erasure_code_plugin_jerasure
TestErasureCodePluginJerasure.cc TestErasureCodePluginJerasure.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_plugin_jerasure ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_plugin_jerasure) add_ceph_unittest(unittest_erasure_code_plugin_jerasure)
target_link_libraries(unittest_erasure_code_plugin_jerasure target_link_libraries(unittest_erasure_code_plugin_jerasure
global global
ceph-common) ceph-common)
@ -93,7 +93,7 @@ add_executable(unittest_erasure_code_isa
TestErasureCodeIsa.cc TestErasureCodeIsa.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_isa ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_isa) add_ceph_unittest(unittest_erasure_code_isa)
target_link_libraries(unittest_erasure_code_isa target_link_libraries(unittest_erasure_code_isa
global global
ceph-common ceph-common
@ -107,7 +107,7 @@ add_executable(unittest_erasure_code_plugin_isa
TestErasureCodePluginIsa.cc TestErasureCodePluginIsa.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_plugin_isa ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_plugin_isa) add_ceph_unittest(unittest_erasure_code_plugin_isa)
target_link_libraries(unittest_erasure_code_plugin_isa target_link_libraries(unittest_erasure_code_plugin_isa
global global
ceph-common ceph-common
@ -122,7 +122,7 @@ endif(HAVE_BETTER_YASM_ELF64)
add_executable(unittest_erasure_code_lrc add_executable(unittest_erasure_code_lrc
TestErasureCodeLrc.cc TestErasureCodeLrc.cc
$<TARGET_OBJECTS:unit-main>) $<TARGET_OBJECTS:unit-main>)
add_ceph_unittest(unittest_erasure_code_lrc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_lrc) add_ceph_unittest(unittest_erasure_code_lrc)
target_link_libraries(unittest_erasure_code_lrc target_link_libraries(unittest_erasure_code_lrc
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -135,7 +135,7 @@ add_executable(unittest_erasure_code_plugin_lrc
TestErasureCodePluginLrc.cc TestErasureCodePluginLrc.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_plugin_lrc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_plugin_lrc) add_ceph_unittest(unittest_erasure_code_plugin_lrc)
add_dependencies(unittest_erasure_code_plugin_lrc add_dependencies(unittest_erasure_code_plugin_lrc
ec_lrc ec_lrc
ec_jerasure) ec_jerasure)
@ -149,7 +149,7 @@ add_executable(unittest_erasure_code_plugin_shec
TestErasureCodePluginShec.cc TestErasureCodePluginShec.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_plugin_shec ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_plugin_shec) add_ceph_unittest(unittest_erasure_code_plugin_shec)
target_link_libraries(unittest_erasure_code_plugin_shec target_link_libraries(unittest_erasure_code_plugin_shec
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -163,7 +163,7 @@ add_executable(unittest_erasure_code_example
TestErasureCodeExample.cc TestErasureCodeExample.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_example ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_example) add_ceph_unittest(unittest_erasure_code_example)
target_link_libraries(unittest_erasure_code_example target_link_libraries(unittest_erasure_code_example
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -181,7 +181,7 @@ add_executable(unittest_erasure_code_jerasure
TestErasureCodeJerasure.cc TestErasureCodeJerasure.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_jerasure ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_jerasure) add_ceph_unittest(unittest_erasure_code_jerasure)
target_link_libraries(unittest_erasure_code_jerasure target_link_libraries(unittest_erasure_code_jerasure
global global
ceph-common ceph-common
@ -196,7 +196,7 @@ add_executable(unittest_erasure_code_shec
TestErasureCodeShec.cc TestErasureCodeShec.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_shec ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_shec) add_ceph_unittest(unittest_erasure_code_shec)
target_link_libraries(unittest_erasure_code_shec target_link_libraries(unittest_erasure_code_shec
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -208,7 +208,7 @@ target_link_libraries(unittest_erasure_code_shec
add_executable(unittest_erasure_code_shec_all add_executable(unittest_erasure_code_shec_all
TestErasureCodeShec_all.cc TestErasureCodeShec_all.cc
) )
add_ceph_unittest(unittest_erasure_code_shec_all ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_shec_all) add_ceph_unittest(unittest_erasure_code_shec_all)
target_link_libraries(unittest_erasure_code_shec_all target_link_libraries(unittest_erasure_code_shec_all
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -221,7 +221,7 @@ add_executable(unittest_erasure_code_shec_thread
TestErasureCodeShec_thread.cc TestErasureCodeShec_thread.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_erasure_code_shec_thread ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_shec_thread) add_ceph_unittest(unittest_erasure_code_shec_thread)
target_link_libraries(unittest_erasure_code_shec_thread target_link_libraries(unittest_erasure_code_shec_thread
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
@ -234,7 +234,7 @@ target_link_libraries(unittest_erasure_code_shec_thread
add_executable(unittest_erasure_code_shec_arguments add_executable(unittest_erasure_code_shec_arguments
TestErasureCodeShec_arguments.cc TestErasureCodeShec_arguments.cc
) )
add_ceph_unittest(unittest_erasure_code_shec_arguments ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_erasure_code_shec_arguments) add_ceph_unittest(unittest_erasure_code_shec_arguments)
target_link_libraries(unittest_erasure_code_shec_arguments target_link_libraries(unittest_erasure_code_shec_arguments
global global
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}

View File

@ -2,5 +2,5 @@
add_executable(unittest_mds_types add_executable(unittest_mds_types
mds_types.cc mds_types.cc
) )
add_ceph_unittest(unittest_mds_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_types) add_ceph_unittest(unittest_mds_types)
target_link_libraries(unittest_mds_types global) target_link_libraries(unittest_mds_types global)

View File

@ -20,7 +20,7 @@ set(unittest_journal_srcs
add_executable(unittest_journal add_executable(unittest_journal
${unittest_journal_srcs} ${unittest_journal_srcs}
) )
add_ceph_unittest(unittest_journal ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_journal) add_ceph_unittest(unittest_journal)
target_link_libraries(unittest_journal target_link_libraries(unittest_journal
journal journal
cls_journal cls_journal

View File

@ -169,14 +169,14 @@ install(TARGETS
add_executable(unittest_librados add_executable(unittest_librados
librados.cc librados.cc
) )
add_ceph_unittest(unittest_librados ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_librados) add_ceph_unittest(unittest_librados)
target_link_libraries(unittest_librados librados ${BLKID_LIBRARIES}) target_link_libraries(unittest_librados librados ${BLKID_LIBRARIES})
# unittest_librados_config # unittest_librados_config
add_executable(unittest_librados_config add_executable(unittest_librados_config
librados_config.cc librados_config.cc
) )
add_ceph_unittest(unittest_librados_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_librados_config) add_ceph_unittest(unittest_librados_config)
target_link_libraries(unittest_librados_config target_link_libraries(unittest_librados_config
librados librados
${BLKID_LIBRARIES} ${BLKID_LIBRARIES}

View File

@ -3,7 +3,7 @@ add_executable(unittest_mds_authcap
TestMDSAuthCaps.cc TestMDSAuthCaps.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_mds_authcap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_authcap) add_ceph_unittest(unittest_mds_authcap)
target_link_libraries(unittest_mds_authcap mds global ${BLKID_LIBRARIES}) target_link_libraries(unittest_mds_authcap mds global ${BLKID_LIBRARIES})
# unittest_mds_sessionfilter # unittest_mds_sessionfilter
@ -11,6 +11,6 @@ add_executable(unittest_mds_sessionfilter
TestSessionFilter.cc TestSessionFilter.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_mds_sessionfilter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_sessionfilter) add_ceph_unittest(unittest_mds_sessionfilter)
target_link_libraries(unittest_mds_sessionfilter mds osdc ceph-common global ${BLKID_LIBRARIES}) target_link_libraries(unittest_mds_sessionfilter mds osdc ceph-common global ${BLKID_LIBRARIES})

View File

@ -24,7 +24,7 @@ set_target_properties(ceph_test_mon_msg PROPERTIES COMPILE_FLAGS
add_executable(unittest_mon_moncap add_executable(unittest_mon_moncap
moncap.cc moncap.cc
) )
add_ceph_unittest(unittest_mon_moncap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mon_moncap) add_ceph_unittest(unittest_mon_moncap)
target_link_libraries(unittest_mon_moncap mon global) target_link_libraries(unittest_mon_moncap mon global)
# unittest_mon_pgmap # unittest_mon_pgmap
@ -32,12 +32,12 @@ add_executable(unittest_mon_pgmap
PGMap.cc PGMap.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_mon_pgmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mon_pgmap) add_ceph_unittest(unittest_mon_pgmap)
target_link_libraries(unittest_mon_pgmap mon global) target_link_libraries(unittest_mon_pgmap mon global)
# unittest_mon_montypes # unittest_mon_montypes
add_executable(unittest_mon_montypes add_executable(unittest_mon_montypes
test_mon_types.cc test_mon_types.cc
) )
add_ceph_unittest(unittest_mon_montypes ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mon_montypes) add_ceph_unittest(unittest_mon_montypes)
target_link_libraries(unittest_mon_montypes mon global) target_link_libraries(unittest_mon_montypes mon global)

View File

@ -96,7 +96,7 @@ install(TARGETS ceph_test_filestore_idempotent_sequence
add_executable(unittest_chain_xattr add_executable(unittest_chain_xattr
chain_xattr.cc chain_xattr.cc
) )
add_ceph_unittest(unittest_chain_xattr ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_chain_xattr) add_ceph_unittest(unittest_chain_xattr)
target_link_libraries(unittest_chain_xattr os global) target_link_libraries(unittest_chain_xattr os global)
# unittest_rocksdb_option # unittest_rocksdb_option
@ -104,7 +104,7 @@ add_executable(unittest_rocksdb_option
TestRocksdbOptionParse.cc TestRocksdbOptionParse.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_rocksdb_option ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rocksdb_option) add_ceph_unittest(unittest_rocksdb_option)
target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES}) target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
if(HAVE_LIBAIO) if(HAVE_LIBAIO)
@ -113,40 +113,40 @@ if(HAVE_LIBAIO)
BitAllocator_test.cc BitAllocator_test.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_bit_alloc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bit_alloc) add_ceph_unittest(unittest_bit_alloc)
target_link_libraries(unittest_bit_alloc os global) target_link_libraries(unittest_bit_alloc os global)
add_executable(unittest_alloc add_executable(unittest_alloc
Allocator_test.cc Allocator_test.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_alloc ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_alloc) add_ceph_unittest(unittest_alloc)
target_link_libraries(unittest_alloc os global) target_link_libraries(unittest_alloc os global)
# unittest_bluefs # unittest_bluefs
add_executable(unittest_bluefs add_executable(unittest_bluefs
test_bluefs.cc test_bluefs.cc
) )
add_ceph_unittest(unittest_bluefs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bluefs) add_ceph_unittest(unittest_bluefs)
target_link_libraries(unittest_bluefs os global) target_link_libraries(unittest_bluefs os global)
# unittest_bluestore_types # unittest_bluestore_types
add_executable(unittest_bluestore_types add_executable(unittest_bluestore_types
test_bluestore_types.cc test_bluestore_types.cc
) )
add_ceph_unittest(unittest_bluestore_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bluestore_types) add_ceph_unittest(unittest_bluestore_types)
target_link_libraries(unittest_bluestore_types os global) target_link_libraries(unittest_bluestore_types os global)
endif(HAVE_LIBAIO) endif(HAVE_LIBAIO)
# unittest_transaction # unittest_transaction
add_executable(unittest_transaction add_executable(unittest_transaction
test_transaction.cc) test_transaction.cc)
add_ceph_unittest(unittest_transaction ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_transaction) add_ceph_unittest(unittest_transaction)
target_link_libraries(unittest_transaction os ceph-common ${XIO_LIBRARY}) target_link_libraries(unittest_transaction os ceph-common ${XIO_LIBRARY})
# unittest_memstore_clone # unittest_memstore_clone
add_executable(unittest_memstore_clone add_executable(unittest_memstore_clone
test_memstore_clone.cc test_memstore_clone.cc
$<TARGET_OBJECTS:store_test_fixture>) $<TARGET_OBJECTS:store_test_fixture>)
add_ceph_unittest(unittest_memstore_clone ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_memstore_clone) add_ceph_unittest(unittest_memstore_clone)
target_link_libraries(unittest_memstore_clone os global) target_link_libraries(unittest_memstore_clone os global)

View File

@ -2,6 +2,6 @@
add_executable(unittest_lfnindex add_executable(unittest_lfnindex
TestLFNIndex.cc TestLFNIndex.cc
) )
add_ceph_unittest(unittest_lfnindex ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_lfnindex) add_ceph_unittest(unittest_lfnindex)
target_link_libraries(unittest_lfnindex os global) target_link_libraries(unittest_lfnindex os global)

View File

@ -24,21 +24,21 @@ add_ceph_test(safe-to-destroy.sh ${CMAKE_CURRENT_SOURCE_DIR}/safe-to-destroy.sh)
add_executable(unittest_osdmap add_executable(unittest_osdmap
TestOSDMap.cc TestOSDMap.cc
) )
add_ceph_unittest(unittest_osdmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdmap) add_ceph_unittest(unittest_osdmap)
target_link_libraries(unittest_osdmap global ${BLKID_LIBRARIES}) target_link_libraries(unittest_osdmap global ${BLKID_LIBRARIES})
# unittest_osd_types # unittest_osd_types
add_executable(unittest_osd_types add_executable(unittest_osd_types
types.cc types.cc
) )
add_ceph_unittest(unittest_osd_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osd_types) add_ceph_unittest(unittest_osd_types)
target_link_libraries(unittest_osd_types global) target_link_libraries(unittest_osd_types global)
# unittest_ecbackend # unittest_ecbackend
add_executable(unittest_ecbackend add_executable(unittest_ecbackend
TestECBackend.cc TestECBackend.cc
) )
add_ceph_unittest(unittest_ecbackend ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ecbackend) add_ceph_unittest(unittest_ecbackend)
target_link_libraries(unittest_ecbackend osd global) target_link_libraries(unittest_ecbackend osd global)
# unittest_osdscrub # unittest_osdscrub
@ -46,7 +46,7 @@ add_executable(unittest_osdscrub
TestOSDScrub.cc TestOSDScrub.cc
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
) )
add_ceph_unittest(unittest_osdscrub ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdscrub) add_ceph_unittest(unittest_osdscrub)
target_link_libraries(unittest_osdscrub osd os global ${CMAKE_DL_LIBS} mon ${BLKID_LIBRARIES}) target_link_libraries(unittest_osdscrub osd os global ${CMAKE_DL_LIBS} mon ${BLKID_LIBRARIES})
# unittest_pglog # unittest_pglog
@ -55,14 +55,14 @@ add_executable(unittest_pglog
$<TARGET_OBJECTS:unit-main> $<TARGET_OBJECTS:unit-main>
$<TARGET_OBJECTS:store_test_fixture> $<TARGET_OBJECTS:store_test_fixture>
) )
add_ceph_unittest(unittest_pglog ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pglog) add_ceph_unittest(unittest_pglog)
target_link_libraries(unittest_pglog osd os global ${CMAKE_DL_LIBS} ${BLKID_LIBRARIES}) target_link_libraries(unittest_pglog osd os global ${CMAKE_DL_LIBS} ${BLKID_LIBRARIES})
# unittest_hitset # unittest_hitset
add_executable(unittest_hitset add_executable(unittest_hitset
hitset.cc hitset.cc
) )
add_ceph_unittest(unittest_hitset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_hitset) add_ceph_unittest(unittest_hitset)
target_link_libraries(unittest_hitset osd global ${BLKID_LIBRARIES}) target_link_libraries(unittest_hitset osd global ${BLKID_LIBRARIES})
# unittest_osd_osdcap # unittest_osd_osdcap
@ -73,37 +73,35 @@ if(HAS_VTA)
set_source_files_properties(osdcap.cc PROPERTIES set_source_files_properties(osdcap.cc PROPERTIES
COMPILE_FLAGS -fno-var-tracking-assignments) COMPILE_FLAGS -fno-var-tracking-assignments)
endif() endif()
add_ceph_unittest(unittest_osd_osdcap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osd_osdcap) add_ceph_unittest(unittest_osd_osdcap)
target_link_libraries(unittest_osd_osdcap osd global ${BLKID_LIBRARIES}) target_link_libraries(unittest_osd_osdcap osd global ${BLKID_LIBRARIES})
# unittest ExtentCache # unittest ExtentCache
add_executable(unittest_extent_cache add_executable(unittest_extent_cache
test_extent_cache.cc test_extent_cache.cc
) )
add_ceph_unittest(unittest_extent_cache ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_extent_cache) add_ceph_unittest(unittest_extent_cache)
target_link_libraries(unittest_extent_cache osd global ${BLKID_LIBRARIES}) target_link_libraries(unittest_extent_cache osd global ${BLKID_LIBRARIES})
# unittest PGTransaction # unittest PGTransaction
add_executable(unittest_pg_transaction add_executable(unittest_pg_transaction
test_pg_transaction.cc test_pg_transaction.cc
) )
add_ceph_unittest(unittest_pg_transaction ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pg_transaction) add_ceph_unittest(unittest_pg_transaction)
target_link_libraries(unittest_pg_transaction osd global ${BLKID_LIBRARIES}) target_link_libraries(unittest_pg_transaction osd global ${BLKID_LIBRARIES})
# unittest ECTransaction # unittest ECTransaction
add_executable(unittest_ec_transaction add_executable(unittest_ec_transaction
test_ec_transaction.cc test_ec_transaction.cc
) )
add_ceph_unittest(unittest_ec_transaction ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ec_transaction) add_ceph_unittest(unittest_ec_transaction)
target_link_libraries(unittest_ec_transaction osd global ${BLKID_LIBRARIES}) target_link_libraries(unittest_ec_transaction osd global ${BLKID_LIBRARIES})
# unittest_mclock_op_class_queue # unittest_mclock_op_class_queue
add_executable(unittest_mclock_op_class_queue add_executable(unittest_mclock_op_class_queue
TestMClockOpClassQueue.cc TestMClockOpClassQueue.cc
) )
add_ceph_unittest(unittest_mclock_op_class_queue add_ceph_unittest(unittest_mclock_op_class_queue)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mclock_op_class_queue
)
target_link_libraries(unittest_mclock_op_class_queue target_link_libraries(unittest_mclock_op_class_queue
global osd dmclock global osd dmclock
) )
@ -112,9 +110,7 @@ target_link_libraries(unittest_mclock_op_class_queue
add_executable(unittest_mclock_client_queue add_executable(unittest_mclock_client_queue
TestMClockClientQueue.cc TestMClockClientQueue.cc
) )
add_ceph_unittest(unittest_mclock_client_queue add_ceph_unittest(unittest_mclock_client_queue)
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mclock_client_queue
)
target_link_libraries(unittest_mclock_client_queue target_link_libraries(unittest_mclock_client_queue
global osd dmclock global osd dmclock
) )

View File

@ -38,7 +38,7 @@ add_executable(unittest_rbd_mirror
image_sync/test_mock_SyncPointPruneRequest.cc image_sync/test_mock_SyncPointPruneRequest.cc
pool_watcher/test_mock_RefreshImagesRequest.cc pool_watcher/test_mock_RefreshImagesRequest.cc
) )
add_ceph_unittest(unittest_rbd_mirror ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_mirror) add_ceph_unittest(unittest_rbd_mirror)
set_target_properties(unittest_rbd_mirror PROPERTIES COMPILE_FLAGS set_target_properties(unittest_rbd_mirror PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS}) ${UNITTEST_CXX_FLAGS})
add_dependencies(unittest_rbd_mirror add_dependencies(unittest_rbd_mirror

View File

@ -1,23 +1,23 @@
#unittest_rgw_bencode #unittest_rgw_bencode
add_executable(unittest_rgw_bencode test_rgw_bencode.cc) add_executable(unittest_rgw_bencode test_rgw_bencode.cc)
add_ceph_unittest(unittest_rgw_bencode ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_bencode) add_ceph_unittest(unittest_rgw_bencode)
target_link_libraries(unittest_rgw_bencode rgw_a) target_link_libraries(unittest_rgw_bencode rgw_a)
#unitttest_rgw_period_history #unitttest_rgw_period_history
add_executable(unittest_rgw_period_history test_rgw_period_history.cc) add_executable(unittest_rgw_period_history test_rgw_period_history.cc)
add_ceph_unittest(unittest_rgw_period_history ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_period_history) add_ceph_unittest(unittest_rgw_period_history)
target_link_libraries(unittest_rgw_period_history rgw_a) target_link_libraries(unittest_rgw_period_history rgw_a)
# unitttest_rgw_compression # unitttest_rgw_compression
add_executable(unittest_rgw_compression add_executable(unittest_rgw_compression
test_rgw_compression.cc test_rgw_compression.cc
$<TARGET_OBJECTS:unit-main>) $<TARGET_OBJECTS:unit-main>)
add_ceph_unittest(unittest_rgw_compression ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_compression) add_ceph_unittest(unittest_rgw_compression)
target_link_libraries(unittest_rgw_compression rgw_a) target_link_libraries(unittest_rgw_compression rgw_a)
# unitttest_http_manager # unitttest_http_manager
add_executable(unittest_http_manager test_http_manager.cc) add_executable(unittest_http_manager test_http_manager.cc)
add_ceph_unittest(unittest_http_manager ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_http_manager) add_ceph_unittest(unittest_http_manager)
target_link_libraries(unittest_http_manager rgw_a) target_link_libraries(unittest_http_manager rgw_a)
set(test_rgw_a_src set(test_rgw_a_src
@ -85,7 +85,7 @@ set(test_rgw_crypto_srcs test_rgw_crypto.cc)
add_executable(unittest_rgw_crypto add_executable(unittest_rgw_crypto
${test_rgw_crypto_srcs} ${test_rgw_crypto_srcs}
) )
add_ceph_unittest(unittest_rgw_crypto ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_crypto) add_ceph_unittest(unittest_rgw_crypto)
target_link_libraries(unittest_rgw_crypto target_link_libraries(unittest_rgw_crypto
rgw_a rgw_a
@ -109,7 +109,7 @@ set_target_properties(unittest_rgw_crypto PROPERTIES COMPILE_FLAGS$ {UNITTEST_CX
# ceph_test_rgw_iam_policy # ceph_test_rgw_iam_policy
add_executable(unittest_rgw_iam_policy test_rgw_iam_policy.cc) add_executable(unittest_rgw_iam_policy test_rgw_iam_policy.cc)
add_ceph_unittest(unittest_rgw_iam_policy ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_iam_policy) add_ceph_unittest(unittest_rgw_iam_policy)
target_link_libraries(unittest_rgw_iam_policy target_link_libraries(unittest_rgw_iam_policy
rgw_a rgw_a
cls_rgw_client cls_rgw_client
@ -132,4 +132,4 @@ set_target_properties(unittest_rgw_iam_policy PROPERTIES COMPILE_FLAGS ${UNITTES
# unitttest_rgw_string # unitttest_rgw_string
add_executable(unittest_rgw_string test_rgw_string.cc) add_executable(unittest_rgw_string test_rgw_string.cc)
add_ceph_unittest(unittest_rgw_string ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rgw_string) add_ceph_unittest(unittest_rgw_string)