From e12db6f2ab910dbb05ac2efd66304a2926c0f6db Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:25:40 -0700 Subject: [PATCH] Don't download GTest unless building unit test (#275) [ROCm/rccl commit: 88a062342bad6a7251c2264d0bb7b291f53ccfb7] --- projects/rccl/cmake/Dependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rccl/cmake/Dependencies.cmake b/projects/rccl/cmake/Dependencies.cmake index f135d16b67..e2fde5c66b 100644 --- a/projects/rccl/cmake/Dependencies.cmake +++ b/projects/rccl/cmake/Dependencies.cmake @@ -34,7 +34,7 @@ include(cmake/DownloadProject.cmake) find_package(GTest 1.10) -if(NOT GTest_FOUND OR INSTALL_DEPENDENCIES) +if(NOT GTest_FOUND AND BUILD_TESTS OR INSTALL_DEPENDENCIES) if(CMAKE_CXX_COMPILER MATCHES ".*/hipcc$") # hip-clang cannot compile googlebenchmark for some reason set(COMPILER_OVERRIDE "-DCMAKE_CXX_COMPILER=g++")