fix compile error (#7040)

Summary:
WITH_TESTS=OFF and WITH_BENCHMARK_TOOLS=ON

there has errors:
 /bin/ld: cannot find -ltestharness

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

Reviewed By: riversand963

Differential Revision: D22447637

Pulled By: ajkr

fbshipit-source-id: f63058376deb4a2e6722d63541c40caa617c331a
main
球状闪电 4 years ago committed by Facebook GitHub Bot
parent 90fd6b0cc8
commit 7c6f3d8477
  1. 5
      CMakeLists.txt

@ -986,11 +986,14 @@ endif()
option(WITH_ALL_TESTS "Build all test, rather than a small subset" ON)
if(WITH_TESTS)
if(WITH_TESTS OR WITH_BENCHMARK_TOOLS)
add_subdirectory(third-party/gtest-1.8.1/fused-src/gtest)
add_library(testharness STATIC
test_util/testharness.cc)
target_link_libraries(testharness gtest)
endif()
if(WITH_TESTS)
set(TESTS
db/db_basic_test.cc
env/env_basic_test.cc

Loading…
Cancel
Save