Skip to content

Commit

Permalink
[tensorpipe] better find_package, find_dependency for libuv (#298)
Browse files Browse the repository at this point in the history
* [tensorpipe] fix find_package(libuv)

* [tensorpipe] use find_dependency for libuv

* update baseline
  • Loading branch information
luncliff authored Nov 23, 2024
1 parent 74c57aa commit 49e3786
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ports/tensorpipe/TensorpipeConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ file(GLOB CONFIG_FILES "${_DIR}/TensorpipeConfig-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
include(CMakeFindDependencyMacro)
find_dependency(libuv)

# ${_DIR}/TensorpipeTargets-*.cmake will be included here
include("${_DIR}/TensorpipeTargets.cmake")
Expand Down
2 changes: 1 addition & 1 deletion ports/tensorpipe/fix-cmakelists.patch
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ index 5c36064..cfaf0bc 100644
-list(APPEND TP_LINK_LIBRARIES uv::uv)
+# `libuv` in vcpkg
+find_package(libuv CONFIG REQUIRED)
+list(APPEND TP_LINK_LIBRARIES libuv::uv)
+list(APPEND TP_LINK_LIBRARIES $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)

### shm

Expand Down
1 change: 1 addition & 0 deletions ports/tensorpipe/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tensorpipe",
"version-date": "2022-05-14",
"port-version": 1,
"description": "A tensor-aware point-to-point communication primitive for machine learning",
"homepage": "https://github.com/pytorch/tensorpipe",
"supports": "linux | osx",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
},
"tensorpipe": {
"baseline": "2022-05-14",
"port-version": 0
"port-version": 1
},
"winpixeventruntime": {
"baseline": "1.0.240308001",
Expand Down
5 changes: 5 additions & 0 deletions versions/t-/tensorpipe.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c63be39eb3e399f41f96fbd39bfa1530951bde15",
"version-date": "2022-05-14",
"port-version": 1
},
{
"git-tree": "2db63d9b007bc20c99bd76d48c2ccf80f6bc4a6a",
"version-date": "2022-05-14",
Expand Down

0 comments on commit 49e3786

Please sign in to comment.