mirror of https://github.com/milvus-io/milvus.git
Skip install gtest when build with test
Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>pull/4973/head^2
parent
846fd8a154
commit
46d27e37d7
|
@ -67,6 +67,8 @@ cwrapper_build
|
|||
**/.lint
|
||||
typescript
|
||||
**/.pytest_cache/
|
||||
.root
|
||||
gtags.conf
|
||||
|
||||
# Delve generated file
|
||||
**/__debug_bin
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
include(FetchContent)
|
||||
FetchContent_Declare(google_benchmark
|
||||
URL https://github.com/google/benchmark/archive/v1.5.2.tar.gz
|
||||
URL_MD5 084b34aceaeac11a6607d35220ca2efa
|
||||
|
|
|
@ -29,7 +29,17 @@ FetchContent_Declare(
|
|||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
|
||||
DOWNLOAD_DIR ${THIRDPARTY_DOWNLOAD_PATH} )
|
||||
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
FetchContent_GetProperties( googletest )
|
||||
if ( NOT googletest_POPULATED )
|
||||
|
||||
FetchContent_Populate( googletest )
|
||||
|
||||
# Adding the following targets:
|
||||
# gtest, gtest_main, gmock, gmock_main
|
||||
add_subdirectory( ${googletest_SOURCE_DIR}
|
||||
${googletest_BINARY_DIR}
|
||||
EXCLUDE_FROM_ALL )
|
||||
endif()
|
||||
# include(GoogleTest)
|
||||
|
||||
# ****************************************************************
|
||||
|
|
|
@ -55,3 +55,4 @@ target_link_libraries(all_tests
|
|||
)
|
||||
|
||||
install (TARGETS all_tests DESTINATION unittest)
|
||||
install (TARGETS index_builder_test DESTINATION unittest)
|
||||
|
|
Loading…
Reference in New Issue