vcpkg/ports/tensorpipe/support-test.patch

46 lines
1.1 KiB
Diff
Raw Normal View History

diff --git a/tensorpipe/test/CMakeLists.txt b/tensorpipe/test/CMakeLists.txt
2023-04-19 11:26:40 +08:00
index 53e8643..09baaa0 100644
--- a/tensorpipe/test/CMakeLists.txt
+++ b/tensorpipe/test/CMakeLists.txt
2023-04-19 11:26:40 +08:00
@@ -93,25 +93,30 @@ if(TP_USE_CUDA)
channel/cuda_ipc/cuda_ipc_test.cc
)
endif()
-
- list(APPEND TP_TEST_SRCS
- channel/cuda_gdr/cuda_gdr_test.cc
- )
-
+ if(TP_ENABLE_CUDA_GDR)
+ list(APPEND TP_TEST_SRCS
+ channel/cuda_gdr/cuda_gdr_test.cc
+ )
+ endif()
cuda_add_library(tensorpipe_cuda_kernel channel/kernel.cu)
list(APPEND TP_TEST_LINK_LIBRARIES tensorpipe_cuda_kernel)
list(APPEND TP_TEST_LINK_LIBRARIES tensorpipe_cuda)
endif()
-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/googletest
- ${PROJECT_BINARY_DIR}/third_party/googletest EXCLUDE_FROM_ALL)
+find_package(GTest CONFIG REQUIRED)
2023-04-19 11:26:40 +08:00
+
+if (TARGET uv)
+ set(LIBUV_LIBRARY uv)
+else()
+ set(LIBUV_LIBRARY uv_a)
+endif()
list(APPEND TP_TEST_LINK_LIBRARIES
tensorpipe
- uv::uv
- gmock
- gtest_main)
2023-04-19 11:26:40 +08:00
+ ${LIBUV_LIBRARY}
+ GTest::gmock
+ GTest::gtest_main)
add_executable(tensorpipe_test ${TP_TEST_SRCS})