mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Our own CMakeFiles for gtest
This commit is contained in:
parent
3f4b6da6a8
commit
048a8b784b
6
contrib/CMakeLists.txt
vendored
6
contrib/CMakeLists.txt
vendored
@ -159,11 +159,7 @@ if (USE_INTERNAL_AVRO_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(USE_INTERNAL_GTEST_LIBRARY)
|
||||
set(GOOGLETEST_VERSION 1.10.0) # master
|
||||
# Google Test from sources
|
||||
add_subdirectory(${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
||||
# avoid problems with <regexp.h>
|
||||
target_compile_definitions (gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
||||
add_subdirectory(googletest-cmake)
|
||||
elseif(GTEST_SRC_DIR)
|
||||
add_subdirectory(${GTEST_SRC_DIR}/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
||||
target_compile_definitions(gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
||||
|
11
contrib/googletest-cmake/CMakeLists.txt
Normal file
11
contrib/googletest-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
set (SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest")
|
||||
|
||||
add_library(gtest "${SRC_DIR}/src/gtest-all.cc")
|
||||
set_target_properties(gtest PROPERTIES VERSION "1.0.0")
|
||||
target_compile_definitions (gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
||||
target_include_directories(gtest SYSTEM PUBLIC "${SRC_DIR}/include")
|
||||
target_include_directories(gtest PRIVATE "${SRC_DIR}")
|
||||
|
||||
add_library(gtest_main "${SRC_DIR}/src/gtest_main.cc")
|
||||
set_target_properties(gtest_main PROPERTIES VERSION "1.0.0")
|
||||
target_link_libraries(gtest_main PUBLIC gtest)
|
Loading…
Reference in New Issue
Block a user