From 8c0810de26a6f2d743c75968ff3de0b1c4df7348 Mon Sep 17 00:00:00 2001 From: BilyZ98 Date: Wed, 27 Jul 2022 09:10:18 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f43d668bd..cf0ee0b58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1509,6 +1509,20 @@ if(WITH_BENCHMARK_TOOLS) ${ROCKSDB_LIB} ${GFLAGS_LIB}) 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) add_subdirectory(tools) add_custom_target(core_tools