CodeCommitsIssuesPull requestsActionsInsightsSecurity
CLICKHOUSE-3545

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find_gtest.cmake

19lines · modecode

1option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})
2
3if (USE_INTERNAL_GTEST_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
4 message (WARNING "submodule contrib/googletest is missing. to fix try run: \n git submodule update --init --recursive")
5 set (USE_INTERNAL_GTEST_LIBRARY 0)
6endif ()
7
8if (NOT USE_INTERNAL_GTEST_LIBRARY)
9 find_library (GTEST_LIBRARY gtest_main)
10 find_path (GTEST_INCLUDE_DIR NAMES /gtest/gtest.h PATHS ${GTEST_INCLUDE_PATHS})
11endif ()
12
13if (GTEST_LIBRARY AND GTEST_INCLUDE_DIR)
14else ()
15 set (USE_INTERNAL_GTEST_LIBRARY 1)
16 set (GTEST_LIBRARY gtest_main)
17endif ()
18
19message (STATUS "Using gtest: ${GTEST_INCLUDE_DIR} : ${GTEST_LIBRARY}")