2020-03-18 10:57:46 -07:00
|
|
|
set(CORE_TOOLS
|
2016-09-29 02:53:15 +08:00
|
|
|
sst_dump.cc
|
2020-03-18 10:57:46 -07:00
|
|
|
ldb.cc)
|
|
|
|
foreach(src ${CORE_TOOLS})
|
2016-09-29 02:53:15 +08:00
|
|
|
get_filename_component(exename ${src} NAME_WE)
|
|
|
|
add_executable(${exename}${ARTIFACT_SUFFIX}
|
|
|
|
${src})
|
2019-12-10 15:19:24 -08:00
|
|
|
target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB})
|
2020-03-18 10:57:46 -07:00
|
|
|
list(APPEND core_tool_deps ${exename})
|
2016-09-29 02:53:15 +08:00
|
|
|
endforeach()
|
2019-12-05 15:33:14 -08:00
|
|
|
|
2020-03-18 10:57:46 -07:00
|
|
|
if(WITH_TOOLS)
|
|
|
|
set(TOOLS
|
|
|
|
db_sanity_test.cc
|
|
|
|
write_stress.cc
|
|
|
|
db_repl_stress.cc
|
|
|
|
dump/rocksdb_dump.cc
|
|
|
|
dump/rocksdb_undump.cc)
|
|
|
|
foreach(src ${TOOLS})
|
|
|
|
get_filename_component(exename ${src} NAME_WE)
|
|
|
|
add_executable(${exename}${ARTIFACT_SUFFIX}
|
|
|
|
${src})
|
2020-05-12 21:05:50 -07:00
|
|
|
target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB} ${THIRDPARTY_LIBS})
|
2020-03-18 10:57:46 -07:00
|
|
|
list(APPEND tool_deps ${exename})
|
|
|
|
endforeach()
|
2019-12-05 15:33:14 -08:00
|
|
|
|
2020-03-18 10:57:46 -07:00
|
|
|
add_custom_target(ldb_tests
|
|
|
|
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/ldb_tests.py
|
|
|
|
DEPENDS ldb)
|
|
|
|
endif()
|