Do not search for GTest if we're force installing it into build directory (#318)

[ROCm/rccl commit: 61d66c8e18]
This commit is contained in:
Stanley Tsang
2021-02-22 15:22:01 -07:00
committed by GitHub
parent c3296954ea
commit fb7478e3a2
+4 -1
View File
@@ -32,7 +32,9 @@
# For downloading, building, and installing required dependencies
include(cmake/DownloadProject.cmake)
find_package(GTest 1.10)
if(NOT INSTALL_DEPENDENCIES)
find_package(GTest 1.10)
endif()
if(NOT GTest_FOUND AND BUILD_TESTS OR INSTALL_DEPENDENCIES)
if(CMAKE_CXX_COMPILER MATCHES ".*/hipcc$")
@@ -45,6 +47,7 @@ if(NOT GTest_FOUND AND BUILD_TESTS OR INSTALL_DEPENDENCIES)
message(STATUS "GTest not found. Downloading and building GTest.")
# Download, build and install googletest library
set(GTEST_ROOT ${CMAKE_CURRENT_BINARY_DIR}/gtest CACHE PATH "")
download_project(PROJ googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0