ClickHouse/cmake/arch.cmake

24 lines
798 B
CMake
Raw Normal View History

if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
set (ARCH_AMD64 1)
endif ()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set (ARCH_AARCH64 1)
endif ()
if (ARCH_AARCH64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
set (ARCH_ARM 1)
endif ()
if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "i386")
set (ARCH_I386 1)
endif ()
2018-08-19 03:25:38 +00:00
if ((ARCH_ARM AND NOT ARCH_AARCH64) OR ARCH_I386)
message (FATAL_ERROR "32bit platforms are not supported")
endif ()
2019-01-23 14:18:19 +00:00
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le.*|PPC64LE.*)")
2019-01-23 15:24:14 +00:00
set (ARCH_PPC64LE 1)
# FIXME: move this check into tools.cmake
2019-01-23 14:18:19 +00:00
if (COMPILER_CLANG OR (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8))
2019-12-20 00:01:51 +00:00
message(FATAL_ERROR "Only gcc-8 or higher is supported for powerpc architecture")
2019-01-23 14:18:19 +00:00
endif ()
endif ()