2023-04-18 11:11:42 +00:00
|
|
|
set (SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/googletest")
|
2021-11-21 16:30:36 +00:00
|
|
|
|
2023-04-18 11:11:42 +00:00
|
|
|
add_library(_gtest "${SRC_DIR}/googletest/src/gtest-all.cc")
|
2022-01-17 20:26:05 +00:00
|
|
|
set_target_properties(_gtest PROPERTIES VERSION "1.0.0")
|
2022-07-17 14:01:47 +00:00
|
|
|
target_compile_definitions (_gtest PUBLIC GTEST_HAS_POSIX_RE=0)
|
2023-04-18 11:11:42 +00:00
|
|
|
target_include_directories(_gtest SYSTEM PUBLIC "${SRC_DIR}/googletest/include")
|
|
|
|
target_include_directories(_gtest PRIVATE "${SRC_DIR}/googletest")
|
2021-11-21 16:30:36 +00:00
|
|
|
|
2023-10-13 07:47:58 +00:00
|
|
|
add_library(ch_contrib::gtest ALIAS _gtest)
|
2023-04-18 11:11:42 +00:00
|
|
|
|
|
|
|
add_library(_gmock "${SRC_DIR}/googlemock/src/gmock-all.cc")
|
|
|
|
set_target_properties(_gmock PROPERTIES VERSION "1.0.0")
|
|
|
|
target_compile_definitions (_gmock PUBLIC GTEST_HAS_POSIX_RE=0)
|
2023-09-25 20:43:01 +00:00
|
|
|
target_include_directories(_gmock SYSTEM PUBLIC "${SRC_DIR}/googlemock/include" "${SRC_DIR}/googletest/include")
|
2023-04-18 11:11:42 +00:00
|
|
|
target_include_directories(_gmock PRIVATE "${SRC_DIR}/googlemock")
|
2022-08-05 20:58:32 +00:00
|
|
|
target_link_libraries(_gmock PUBLIC _gtest)
|
2023-04-18 11:11:42 +00:00
|
|
|
|
|
|
|
add_library(_gmock_main "${SRC_DIR}/googlemock/src/gmock_main.cc")
|
|
|
|
set_target_properties(_gmock_main PROPERTIES VERSION "1.0.0")
|
|
|
|
target_link_libraries(_gmock_main PUBLIC _gmock)
|
|
|
|
|
|
|
|
add_library(_gmock_all INTERFACE)
|
|
|
|
target_link_libraries(_gmock_all INTERFACE _gmock _gmock_main)
|
|
|
|
add_library(ch_contrib::gmock_all ALIAS _gmock_all)
|