CodeCommitsIssuesPull requestsActionsInsightsSecurity
29c7c36957a19f57d33a6d464ff5f3a55618aca0

Branches

Tags

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

Clone

HTTPS

Download ZIP

cmake/arch.cmake

33lines · modecode

1if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
2 set (ARCH_AARCH64 1)
3endif ()
4if (ARCH_AARCH64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
5 set (ARCH_ARM 1)
6endif ()
7if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "i386")
8 set (ARCH_I386 1)
9endif ()
10if ( ( ARCH_ARM AND NOT ARCH_AARCH64 ) OR ARCH_I386)
11 set (ARCH_32 1)
12 message (WARNING "Support for 32bit platforms is highly experimental")
13endif ()
14if (CMAKE_SYSTEM MATCHES "Linux")
15 set (ARCH_LINUX 1)
16endif ()
17if (CMAKE_SYSTEM MATCHES "FreeBSD")
18 set (ARCH_FREEBSD 1)
19endif ()
20
21if (NOT MSVC)
22 set (NOT_MSVC 1)
23endif ()
24
25if (NOT APPLE)
26 set (NOT_APPLE 1)
27endif ()
28
29if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
30 set (COMPILER_GCC 1)
31elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
32 set (COMPILER_CLANG 1)
33endif ()