Skip to content

Commit bd65656

Browse files
committed
Add build_gtest cmake option
1 parent 051560d commit bd65656

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ endif()
1111

1212
option(CPPBASE_BUILD_TESTING "Build unit tests" ${CPPBASE_STANDALONE_PROJECT})
1313
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" OFF)
14+
option(CPPBASE_BUILD_GTEST "Build google test" ON)
1415

1516
# set(CMAKE_INCLUDE_CURRENT_DIR ON) # this causes capnproto build to fail
1617
set(CMAKE_CXX_STANDARD_REQUIRED ON)

thirdparty/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
7878
# googletest
7979
# ============================================================
8080
#
81+
if(CPPBASE_BUILD_GTEST)
8182
message("==> Configuring googletest")
8283
set(BUILD_SHARED_LIBS ON CACHE BOOL "")
8384
set(INSTALL_GMOCK OFF CACHE BOOL "")
@@ -91,6 +92,7 @@ download_project(
9192
QUIET
9293
)
9394
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
95+
endif()
9496

9597
# ============================================================
9698
# rapidjson

0 commit comments

Comments
 (0)