2018-01-05 18:03:57 +00:00
|
|
|
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
|
2018-01-20 02:35:16 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
|
|
|
|
if (USE_INTERNAL_GTEST_LIBRARY)
|
|
|
|
message (WARNING "submodule contrib/googletest is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
set (USE_INTERNAL_GTEST_LIBRARY 0)
|
|
|
|
endif ()
|
|
|
|
set (MISSING_INTERNAL_GTEST_LIBRARY 1)
|
2018-01-05 18:03:57 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT USE_INTERNAL_GTEST_LIBRARY)
|
2018-06-19 18:09:09 +00:00
|
|
|
find_package (GTest)
|
2018-01-05 18:03:57 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-06-19 18:09:09 +00:00
|
|
|
if (NOT GTEST_INCLUDE_DIRS AND NOT MISSING_INTERNAL_GTEST_LIBRARY)
|
2018-01-05 18:03:57 +00:00
|
|
|
set (USE_INTERNAL_GTEST_LIBRARY 1)
|
2018-06-19 18:09:09 +00:00
|
|
|
set (GTEST_MAIN_LIBRARIES gtest_main)
|
2018-01-05 18:03:57 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-06-19 18:09:09 +00:00
|
|
|
message (STATUS "Using gtest: ${GTEST_INCLUDE_DIRS} : ${GTEST_MAIN_LIBRARIES}")
|