fixed ARM arch test to prevent breaking on short arch strings

This commit is contained in:
Riccardo Spagni 2015-07-16 12:46:38 +02:00
parent a4254a48f1
commit 54c785d0bb
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -46,19 +46,24 @@ function (die msg)
endfunction () endfunction ()
if (NOT ${ARCH} STREQUAL "") if (NOT ${ARCH} STREQUAL "")
string(SUBSTRING ${ARCH} 0 5 ARM_TEST) string(SUBSTRING ${ARCH} 0 3 IS_ARM)
string(TOLOWER ${ARM_TEST} ARM_TEST) string(TOLOWER ${IS_ARM} IS_ARM)
if (${ARM_TEST} STREQUAL "armv6") if (${IS_ARM} STREQUAL "arm")
set(ARM6 1) string(SUBSTRING ${ARCH} 0 5 ARM_TEST)
else() string(TOLOWER ${ARM_TEST} ARM_TEST)
set(ARM6 0)
endif()
if (${ARM_TEST} STREQUAL "armv7") if (${ARM_TEST} STREQUAL "armv6")
set(ARM7 1) set(ARM6 1)
else() else()
set(ARM7 0) set(ARM6 0)
endif()
if (${ARM_TEST} STREQUAL "armv7")
set(ARM7 1)
else()
set(ARM7 0)
endif()
endif() endif()
endif() endif()