compile gtest only when enable test

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

Differential Revision: D15149190

Pulled By: maysamyabandeh

fbshipit-source-id: fd6d799e80bb502a7ddbc07032ea87e2e3f1e24f
main
bxq2011hust 6 years ago committed by Facebook Github Bot
parent 210b49cac9
commit 25810ca9c7
  1. 3
      CMakeLists.txt

@ -461,8 +461,6 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
# Main library source code # Main library source code
set(SOURCES set(SOURCES
@ -843,6 +841,7 @@ endif()
option(WITH_TESTS "build with tests" ON) option(WITH_TESTS "build with tests" ON)
if(WITH_TESTS) if(WITH_TESTS)
add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
set(TESTS set(TESTS
cache/cache_test.cc cache/cache_test.cc
cache/lru_cache_test.cc cache/lru_cache_test.cc

Loading…
Cancel
Save