CodeCommitsIssuesPull requestsActionsInsightsSecurity
15dc45b9b25246f03e11138fd711f3f423f55461

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/arch.cmake

23lines · modecode

1if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
2 set (ARCH_AMD64 1)
3endif ()
4if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
5 set (ARCH_AARCH64 1)
6endif ()
7if (ARCH_AARCH64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
8 set (ARCH_ARM 1)
9endif ()
10if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "i386")
11 set (ARCH_I386 1)
12endif ()
13if ((ARCH_ARM AND NOT ARCH_AARCH64) OR ARCH_I386)
14 message (FATAL_ERROR "32bit platforms are not supported")
15endif ()
16
17if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le.*|PPC64LE.*)")
18 set (ARCH_PPC64LE 1)
19 # FIXME: move this check into tools.cmake
20 if (COMPILER_CLANG OR (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8))
21 message(FATAL_ERROR "Only gcc-8 or higher is supported for powerpc architecture")
22 endif ()
23endif ()