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
|
@ -45,7 +45,12 @@ function (die msg)
|
|||
message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}")
|
||||
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(TOLOWER ${IS_ARM} IS_ARM)
|
||||
|
||||
|
|
Loading…
Reference in New Issue