aboutsummaryrefslogtreecommitdiff
path: root/ports/tensorpipe/support-test.patch
blob: 16c54ab37dee055ea64741233d4b345dd77e774f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/tensorpipe/test/CMakeLists.txt b/tensorpipe/test/CMakeLists.txt
index c0320aa..1414bdd 100644
--- a/tensorpipe/test/CMakeLists.txt
+++ b/tensorpipe/test/CMakeLists.txt
@@ -86,11 +86,8 @@ if(TP_USE_CUDA)
 endif()
 
 
-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/googletest
-  ${PROJECT_BINARY_DIR}/third_party/googletest)
+find_package(GTest CONFIG REQUIRED)
 
 target_link_libraries(tensorpipe_test PRIVATE
   tensorpipe
-  uv::uv
-  gmock
-  gtest_main)
+  unofficial::libuv::libuv GTest::gmock GTest::gtest_main)

diff --git a/tensorpipe/test/CMakeLists.txt b/tensorpipe/test/CMakeLists.txt
index fecc731..031e40d 100644
--- a/tensorpipe/test/CMakeLists.txt
+++ b/tensorpipe/test/CMakeLists.txt
@@ -80,10 +80,11 @@ if(TP_USE_CUDA)
       channel/cuda_ipc/cuda_ipc_test.cc
       )
   endif()
-
-  target_sources(tensorpipe_test PRIVATE
-    channel/cuda_gdr/cuda_gdr_test.cc
-    )
+  if(TP_ENABLE_CUDA_GDR)
+    target_sources(tensorpipe_test PRIVATE
+      channel/cuda_gdr/cuda_gdr_test.cc
+      )
+  endif()
 endif()