mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-29 18:53:14 +00:00
cmake: initialize ARCH for native builds
We need ARCH, because it needs to be set for ARM7, ARM6 to be initialized. Strangely, on different machines (both ARMv7, Arch), ${ARCH} var is either empty or 'native'. Handle both cases.
This commit is contained in:
parent
bb39034405
commit
804b1bc197
1 changed files with 6 additions and 1 deletions
|
@ -45,7 +45,12 @@ function (die msg)
|
||||||
message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}")
|
message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}")
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
if (NOT ${ARCH} STREQUAL "")
|
if ("${ARCH}" STREQUAL "" OR "${ARCH}" STREQUAL "native")
|
||||||
|
set(ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
|
message(STATUS "Building natively on ${ARCH}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT "${ARCH}" STREQUAL "")
|
||||||
string(SUBSTRING ${ARCH} 0 3 IS_ARM)
|
string(SUBSTRING ${ARCH} 0 3 IS_ARM)
|
||||||
string(TOLOWER ${IS_ARM} IS_ARM)
|
string(TOLOWER ${IS_ARM} IS_ARM)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue