summaryrefslogtreecommitdiffstats
path: root/src/rocksdb/tools/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/rocksdb/tools/CMakeLists.txt')
-rw-r--r--src/rocksdb/tools/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/rocksdb/tools/CMakeLists.txt b/src/rocksdb/tools/CMakeLists.txt
new file mode 100644
index 000000000..4a4b0bcda
--- /dev/null
+++ b/src/rocksdb/tools/CMakeLists.txt
@@ -0,0 +1,30 @@
+set(CORE_TOOLS
+ sst_dump.cc
+ ldb.cc)
+foreach(src ${CORE_TOOLS})
+ get_filename_component(exename ${src} NAME_WE)
+ add_executable(${exename}${ARTIFACT_SUFFIX}
+ ${src})
+ target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB})
+ list(APPEND core_tool_deps ${exename})
+endforeach()
+
+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})
+ target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB})
+ list(APPEND tool_deps ${exename})
+ endforeach()
+
+ add_custom_target(ldb_tests
+ COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/ldb_tests.py
+ DEPENDS ldb)
+endif()