Skip to content

Commit

Permalink
fix x86 arch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb70289 committed Aug 17, 2022
1 parent 27e49fe commit 48ad16d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ include(CheckCXXSourceCompiles)
message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

if(NOT DEFINED ARROW_CPU_FLAG)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|X86|x86|i[3456]86")
set(ARROW_CPU_FLAG "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
set(ARROW_CPU_FLAG "armv8")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7")
set(ARROW_CPU_FLAG "armv7")
Expand All @@ -33,9 +35,9 @@ if(NOT DEFINED ARROW_CPU_FLAG)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(ARROW_CPU_FLAG "s390x")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
set(ARROW_CPU_FLAG "riscv")
set(ARROW_CPU_FLAG "riscv64")
else()
set(ARROW_CPU_FLAG "x86")
message(FATAL_ERROR "Unknown system processor")
endif()
endif()

Expand Down

0 comments on commit 48ad16d

Please sign in to comment.