add trace tools flags in CMakeLists (#10404)

Summary:
It seems like there is no flags in CMakeLists.txt to control the generation of trace tools including trace_analyzer and block_cache_trace_analyzer.

So I add it.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10404

Reviewed By: ajkr

Differential Revision: D38077673

Pulled By: jay-zhuang

fbshipit-source-id: b4d83b3a3281edf34b2ef4a8715c2835e53ffc0f
main
BilyZ98 2 years ago committed by Facebook GitHub Bot
parent 6a0010eb46
commit 8c0810de26
  1. 14
      CMakeLists.txt

@ -1509,6 +1509,20 @@ if(WITH_BENCHMARK_TOOLS)
${ROCKSDB_LIB} ${GFLAGS_LIB}) ${ROCKSDB_LIB} ${GFLAGS_LIB})
endif() endif()
option(WITH_TRACE_TOOLS "build with trace tools" ON)
if(WITH_TRACE_TOOLS)
add_executable(block_cache_trace_analyzer_tool${ARTIFACT_SUFFIX}
tools/block_cache_analyzer/block_cache_trace_analyzer_tool.cc)
target_link_libraries(block_cache_trace_analyzer_tool${ARTIFACT_SUFFIX}
${ROCKSDB_LIB} ${GFLAGS_LIB})
add_executable(trace_analyzer${ARTIFACT_SUFFIX}
tools/trace_analyzer.cc)
target_link_libraries(trace_analyzer${ARTIFACT_SUFFIX}
${ROCKSDB_LIB} ${GFLAGS_LIB})
endif()
if(WITH_CORE_TOOLS OR WITH_TOOLS) if(WITH_CORE_TOOLS OR WITH_TOOLS)
add_subdirectory(tools) add_subdirectory(tools)
add_custom_target(core_tools add_custom_target(core_tools

Loading…
Cancel
Save