CodeCommitsIssuesPull requestsActionsInsightsSecurity
030a8a4164c6eb087d139aaae89aa4b47b36919a

Branches

Tags

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

Clone

HTTPS

Download ZIP

cmake/arch.cmake

24lines · 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 set (ARCH_32 1)
15 message (FATAL_ERROR "32bit platforms are not supported")
16endif ()
17
18if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le.*|PPC64LE.*)")
19 set (ARCH_PPC64LE 1)
20 # FIXME: move this check into tools.cmake
21 if (COMPILER_CLANG OR (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8))
22 message(FATAL_ERROR "Only gcc-8 or higher is supported for powerpc architecture")
23 endif ()
24endif ()