mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
fixed ARM arch test to prevent breaking on short arch strings
This commit is contained in:
parent
a4254a48f1
commit
54c785d0bb
@ -46,19 +46,24 @@ function (die msg)
|
||||
endfunction ()
|
||||
|
||||
if (NOT ${ARCH} STREQUAL "")
|
||||
string(SUBSTRING ${ARCH} 0 5 ARM_TEST)
|
||||
string(TOLOWER ${ARM_TEST} ARM_TEST)
|
||||
string(SUBSTRING ${ARCH} 0 3 IS_ARM)
|
||||
string(TOLOWER ${IS_ARM} IS_ARM)
|
||||
|
||||
if (${ARM_TEST} STREQUAL "armv6")
|
||||
set(ARM6 1)
|
||||
else()
|
||||
set(ARM6 0)
|
||||
endif()
|
||||
if (${IS_ARM} STREQUAL "arm")
|
||||
string(SUBSTRING ${ARCH} 0 5 ARM_TEST)
|
||||
string(TOLOWER ${ARM_TEST} ARM_TEST)
|
||||
|
||||
if (${ARM_TEST} STREQUAL "armv7")
|
||||
set(ARM7 1)
|
||||
else()
|
||||
set(ARM7 0)
|
||||
if (${ARM_TEST} STREQUAL "armv6")
|
||||
set(ARM6 1)
|
||||
else()
|
||||
set(ARM6 0)
|
||||
endif()
|
||||
|
||||
if (${ARM_TEST} STREQUAL "armv7")
|
||||
set(ARM7 1)
|
||||
else()
|
||||
set(ARM7 0)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user