From 25810ca9c7158ec71ec27f8dd98b4d61ff88fc66 Mon Sep 17 00:00:00 2001 From: bxq2011hust Date: Tue, 30 Apr 2019 09:30:46 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb8067d22..f4feee986 100644 --- a/CMakeLists.txt +++ b/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) 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