From 6dbd46a891e9cd0b7554b185222abb23046c5d8c Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 4 Jun 2023 20:32:05 +0700 Subject: [PATCH] Added new CMake options ARM_V8 and ARM_V7. --- CMakeLists.txt | 3 ++- cmake/cpu.cmake | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a44e672b..d37734ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,8 @@ option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF) option(WITH_DMI "Enable DMI/SMBIOS reader" ON) option(BUILD_STATIC "Build static binary" OFF) -option(ARM_TARGET "Force use specific ARM target 8 or 7" 0) +option(ARM_V8 "Force ARMv8 (64 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF) +option(ARM_V7 "Force ARMv7 (32 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF) option(HWLOC_DEBUG "Enable hwloc debug helpers and log" OFF) diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake index cbcd8b01..cdc35f10 100644 --- a/cmake/cpu.cmake +++ b/cmake/cpu.cmake @@ -29,6 +29,12 @@ else() set(WITH_VAES OFF) endif() +if (ARM_V8) + set(ARM_TARGET 8) +elseif (ARM_V7) + set(ARM_TARGET 7) +endif() + if (NOT ARM_TARGET) if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv8-a)$") set(ARM_TARGET 8)