cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
cmake/arch.cmake
23lines · modecode
| 1 | if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64") |
| 2 | set (ARCH_AMD64 1) |
| 3 | endif () |
| 4 | if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") |
| 5 | set (ARCH_AARCH64 1) |
| 6 | endif () |
| 7 | if (ARCH_AARCH64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm") |
| 8 | set (ARCH_ARM 1) |
| 9 | endif () |
| 10 | if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "i386") |
| 11 | set (ARCH_I386 1) |
| 12 | endif () |
| 13 | if ((ARCH_ARM AND NOT ARCH_AARCH64) OR ARCH_I386) |
| 14 | message (FATAL_ERROR "32bit platforms are not supported") |
| 15 | endif () |
| 16 | |
| 17 | if (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 () |
| 23 | endif () |