aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libtorch/fix-osx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libtorch/fix-osx.patch')
-rw-r--r--vcpkg/ports/libtorch/fix-osx.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/vcpkg/ports/libtorch/fix-osx.patch b/vcpkg/ports/libtorch/fix-osx.patch
new file mode 100644
index 0000000..f864151
--- /dev/null
+++ b/vcpkg/ports/libtorch/fix-osx.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 463788e..1ca26e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -796,7 +796,10 @@ if(NOT CMAKE_BUILD_TYPE)
+ endif()
+
+ # The below means we are cross compiling for arm64 or x86_64 on MacOSX
+-if(NOT IOS
++if(TRUE)
++ message(STATUS "Using custom protoc executable: ${PROTOBUF_PROTOC_EXECUTABLE}")
++ message(STATUS "Using custom caffe2 protoc executable: ${CAFFE2_CUSTOM_PROTOC_EXECUTABLE}")
++elseif(NOT IOS
+ AND CMAKE_SYSTEM_NAME STREQUAL "Darwin"
+ AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64)$")
+ set(CROSS_COMPILING_MACOSX TRUE)