未验证 提交 c79f1a29 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Merge pull request #5323 from taosdata/feature/sangshuduo/TD-3148-buildsystem-auto-detect-arch

Feature/sangshuduo/td 3148 buildsystem auto detect arch
...@@ -78,29 +78,58 @@ ELSE() ...@@ -78,29 +78,58 @@ ELSE()
EXIT () EXIT ()
ENDIF () ENDIF ()
# if generate ARM version: IF ("${CPUTYPE}" STREQUAL "")
# cmake -DCPUTYPE=aarch32 .. or cmake -DCPUTYPE=aarch64 MESSAGE(STATUS "The current platform " ${CMAKE_SYSTEM_PROCESSOR} " is detected")
IF (${CPUTYPE} MATCHES "aarch32")
SET(TD_LINUX TRUE) IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)")
SET(TD_LINUX_32 FALSE) MESSAGE(STATUS "The current platform is amd64")
SET(TD_ARM_32 TRUE) MESSAGE(STATUS "Set CPUTYPE to x64")
MESSAGE(STATUS "input cpuType: aarch32") SET(CPUTYPE "x64")
ELSEIF (${CPUTYPE} MATCHES "aarch64") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)")
SET(TD_LINUX TRUE) MESSAGE(STATUS "The current platform is x86")
SET(TD_LINUX_64 FALSE) MESSAGE(STATUS "Set CPUTYPE to x86")
SET(TD_ARM_64 TRUE) SET(CPUTYPE "x32")
MESSAGE(STATUS "input cpuType: aarch64") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l")
ELSEIF (${CPUTYPE} MATCHES "mips64") MESSAGE(STATUS "Set CPUTYPE to aarch32")
SET(TD_LINUX TRUE) SET(CPUTYPE "aarch32")
SET(TD_LINUX_64 FALSE) MESSAGE(STATUS "Set CPUTYPE to aarch32")
SET(TD_MIPS_64 TRUE) SET(TD_LINUX TRUE)
MESSAGE(STATUS "input cpuType: mips64") SET(TD_LINUX_32 FALSE)
ELSEIF (${CPUTYPE} MATCHES "x64") SET(TD_ARM_32 TRUE)
MESSAGE(STATUS "input cpuType: x64") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
ELSEIF (${CPUTYPE} MATCHES "x86") SET(CPUTYPE "aarch64")
MESSAGE(STATUS "input cpuType: x86") MESSAGE(STATUS "Set CPUTYPE to aarch64")
SET(TD_LINUX TRUE)
SET(TD_LINUX_64 FALSE)
SET(TD_ARM_64 TRUE)
ENDIF ()
ELSE () ELSE ()
MESSAGE(STATUS "input cpuType unknown " ${CPUTYPE}) # if generate ARM version:
# cmake -DCPUTYPE=aarch32 .. or cmake -DCPUTYPE=aarch64
IF (${CPUTYPE} MATCHES "aarch32")
SET(TD_LINUX TRUE)
SET(TD_LINUX_32 FALSE)
SET(TD_ARM_32 TRUE)
MESSAGE(STATUS "input cpuType: aarch32")
ELSEIF (${CPUTYPE} MATCHES "aarch64")
SET(TD_LINUX TRUE)
SET(TD_LINUX_64 FALSE)
SET(TD_ARM_64 TRUE)
MESSAGE(STATUS "input cpuType: aarch64")
ELSEIF (${CPUTYPE} MATCHES "mips64")
SET(TD_LINUX TRUE)
SET(TD_LINUX_64 FALSE)
SET(TD_MIPS_64 TRUE)
MESSAGE(STATUS "input cpuType: mips64")
ELSEIF (${CPUTYPE} MATCHES "x64")
MESSAGE(STATUS "input cpuType: x64")
ELSEIF (${CPUTYPE} MATCHES "x86")
MESSAGE(STATUS "input cpuType: x86")
ELSE ()
MESSAGE(STATUS "input cpuType unknown " ${CPUTYPE})
ENDIF ()
ENDIF () ENDIF ()
# cmake -DOSTYPE=Ningsi # cmake -DOSTYPE=Ningsi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册