From 100b5e69f3212a2b0076bbc417a5e9d725e002b9 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Thu, 5 Dec 2019 15:33:14 -0800 Subject: [PATCH] Fix build failure for db_stress tool when building with CMake (#6117) Summary: PR https://github.com/facebook/rocksdb/issues/5937 changed the db_stress tool to also require db_stress_tool.cc, and updated the Makefile but not the CMakeLists.txt file. This updates the CMakeLists.txt file so that the CMake build succeeds again. PR https://github.com/facebook/rocksdb/issues/5950 updated the Makefile build to package db_stress_tool.cc into its own librocksdb_stress.a library. I haven't done that here since there didn't really seem to be much benefit: the Makefile-based build does not install this library. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6117 Test Plan: Confirmed the CMake build succeeds on an Ubuntu 18.04 system. Differential Revision: D18835053 Pulled By: riversand963 fbshipit-source-id: 6e2a66834716e73b1eb736d9b7159870defffec5 --- tools/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 6c4733a71..d1f6792ef 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,7 +1,6 @@ set(TOOLS sst_dump.cc db_sanity_test.cc - db_stress.cc write_stress.cc ldb.cc db_repl_stress.cc @@ -14,6 +13,11 @@ foreach(src ${TOOLS}) target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${LIBS}) list(APPEND tool_deps ${exename}) endforeach() + +add_executable(db_stress${ARTIFACT_SUFFIX} db_stress.cc db_stress_tool.cc) +target_link_libraries(db_stress${ARTIFACT_SUFFIX} ${LIBS}) +list(APPEND tool_deps db_stress) + add_custom_target(tools DEPENDS ${tool_deps}) add_custom_target(ldb_tests -- GitLab