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
This commit is contained in:
bxq2011hust 2019-04-30 09:30:46 -07:00 committed by Facebook Github Bot
parent 210b49cac9
commit 25810ca9c7

View file

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