mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 05:59:07 +08:00
[torch-th] fix arm64-osx build (#27412)
This commit is contained in:
parent
a1af533095
commit
fa31050725
13
ports/torch-th/fix-arm64-osx-config.patch
Normal file
13
ports/torch-th/fix-arm64-osx-config.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/lib/TH/cmake/FindARM.cmake b/lib/TH/cmake/FindARM.cmake
|
||||
index 2dcb2a2..9d68601 100644
|
||||
--- a/lib/TH/cmake/FindARM.cmake
|
||||
+++ b/lib/TH/cmake/FindARM.cmake
|
||||
@@ -45,7 +45,7 @@ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
CPUINFO)
|
||||
|
||||
#neon instruction can be found on the majority part of modern ARM processor
|
||||
- STRING(REGEX REPLACE "^.*(neon).*$" "\\1" NEON_THERE ${CPUINFO})
|
||||
+ STRING(REGEX REPLACE "^.*(neon).*$" "\\1" NEON_THERE "${CPUINFO}")
|
||||
STRING(COMPARE EQUAL "neon" "${NEON_THERE}" NEON_TRUE)
|
||||
IF (NEON_TRUE)
|
||||
set(NEON_FOUND true CACHE BOOL "NEON available on host")
|
@ -8,19 +8,19 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
debug.patch
|
||||
fix-arm64-osx-config.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/lib/TH
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/lib/TH"
|
||||
OPTIONS
|
||||
-DWITH_OPENMP=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/cmake")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/torch-th RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYRIGHT.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/torch-th" RENAME copyright)
|
||||
|
@ -1,7 +1,14 @@
|
||||
{
|
||||
"name": "torch-th",
|
||||
"version-string": "2019-04-19",
|
||||
"port-version": 3,
|
||||
"version-date": "2019-04-19",
|
||||
"port-version": 4,
|
||||
"description": "Torch's TH library",
|
||||
"homepage": "https://github.com/torch/torch7"
|
||||
"homepage": "https://github.com/torch/torch7",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7490,7 +7490,7 @@
|
||||
},
|
||||
"torch-th": {
|
||||
"baseline": "2019-04-19",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"tracy": {
|
||||
"baseline": "0.8.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e870a035791ae5e1dbb2c86fe94644812852ca2d",
|
||||
"version-date": "2019-04-19",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "dd64f0dab429a6baf6dbb12119909ebd9caaa43a",
|
||||
"version-string": "2019-04-19",
|
||||
|
Loading…
Reference in New Issue
Block a user