2019-10-13 16:06:54 +00:00
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
|
2022-04-25 10:02:28 +00:00
|
|
|
if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "i386")
|
|
|
|
message (FATAL_ERROR "32bit platforms are not supported")
|
|
|
|
endif ()
|
2019-10-13 16:06:54 +00:00
|
|
|
set (ARCH_AMD64 1)
|
2022-04-25 10:02:28 +00:00
|
|
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
|
2018-02-26 18:34:22 +00:00
|
|
|
set (ARCH_AARCH64 1)
|
2022-08-19 18:45:51 +00:00
|
|
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc64le.*|ppc64le.*|PPC64LE.*)")
|
2019-01-23 15:24:14 +00:00
|
|
|
set (ARCH_PPC64LE 1)
|
2023-01-20 21:16:55 +00:00
|
|
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x.*|S390X.*)")
|
|
|
|
set (ARCH_S390X 1)
|
2022-04-25 10:02:28 +00:00
|
|
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
|
2021-11-11 18:18:41 +00:00
|
|
|
set (ARCH_RISCV64 1)
|
2024-03-15 03:11:24 +00:00
|
|
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
|
|
|
|
set (ARCH_LOONGARCH64 1)
|
2022-04-25 10:02:28 +00:00
|
|
|
else ()
|
|
|
|
message (FATAL_ERROR "Platform ${CMAKE_SYSTEM_PROCESSOR} is not supported")
|
2021-11-11 18:18:41 +00:00
|
|
|
endif ()
|