Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pytorch/cpuinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Skidan <al.skidan@gmail.com>2022-02-01 02:20:55 +0300
committerGitHub <noreply@github.com>2022-02-01 02:20:55 +0300
commitfacbce37a2df04f3f9c73c0a91569a03bc9282bb (patch)
tree5502a2446bbbf7087a17074c7c6da12f7cc0f991
parent7357f7dc5dd4e2f3fe5b76df8dfbc15db0e61588 (diff)
Fix CMake build for iOS. (#56)
CPUINFO_TARGET_PROCESSOR was not set when the cpuinfo was cross-compiled with CMAKE_SYTEM_NAME=iOS. Co-authored-by: Oleksii Skidan <oleksii.skidan@ua.ibm.com>
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57abc26..a7334c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ ENDMACRO()
# -- [ Determine target processor
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
-IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64)$")
+IF(IOS OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64)$"))
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}")
ENDIF()