提交 8f07fc1b 编写于 作者: sangshuduo's avatar sangshuduo

[TD-3148] <feature>: make build system detect host arch.

上级 8e65dc0b
...@@ -79,7 +79,7 @@ ELSE() ...@@ -79,7 +79,7 @@ ELSE()
ENDIF () ENDIF ()
IF ("${CPUTYPE}" STREQUAL "") IF ("${CPUTYPE}" STREQUAL "")
MESSAGE(STATUS "The current platform is detected as " ${CMAKE_SYSTEM_PROCESSOR}) MESSAGE(STATUS "The current platform " ${CMAKE_SYSTEM_PROCESSOR} " is detected")
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)") IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)")
MESSAGE(STATUS "The current platform is amd64") MESSAGE(STATUS "The current platform is amd64")
...@@ -92,11 +92,13 @@ IF ("${CPUTYPE}" STREQUAL "") ...@@ -92,11 +92,13 @@ IF ("${CPUTYPE}" STREQUAL "")
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l")
MESSAGE(STATUS "Set CPUTYPE to aarch32") MESSAGE(STATUS "Set CPUTYPE to aarch32")
SET(CPUTYPE "aarch32") SET(CPUTYPE "aarch32")
MESSAGE(STATUS "Set CPUTYPE to aarch32")
SET(TD_LINUX TRUE) SET(TD_LINUX TRUE)
SET(TD_LINUX_32 FALSE) SET(TD_LINUX_32 FALSE)
SET(TD_ARM_32 TRUE) SET(TD_ARM_32 TRUE)
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
SET(CPUTYPE "aarch64") SET(CPUTYPE "aarch64")
MESSAGE(STATUS "Set CPUTYPE to aarch64")
SET(TD_LINUX TRUE) SET(TD_LINUX TRUE)
SET(TD_LINUX_64 FALSE) SET(TD_LINUX_64 FALSE)
SET(TD_ARM_64 TRUE) SET(TD_ARM_64 TRUE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册