2019-08-30 16:50:43 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
set (OS_LINUX 1)
|
2019-09-24 00:22:05 +00:00
|
|
|
add_definitions(-D OS_LINUX)
|
2019-08-30 16:50:43 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
set (OS_FREEBSD 1)
|
2019-09-24 00:22:05 +00:00
|
|
|
add_definitions(-D OS_FREEBSD)
|
2019-08-30 16:50:43 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
set (OS_DARWIN 1)
|
2019-09-24 00:22:05 +00:00
|
|
|
add_definitions(-D OS_DARWIN)
|
2019-08-30 16:50:43 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (CMAKE_CROSSCOMPILING)
|
2019-10-05 19:25:31 +00:00
|
|
|
if (OS_DARWIN)
|
2019-09-25 18:51:09 +00:00
|
|
|
# FIXME: broken dependencies
|
2019-10-05 19:25:31 +00:00
|
|
|
set (USE_SNAPPY OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_PARQUET OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_READLINE OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_ICU OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_FASTOPS OFF CACHE INTERNAL "")
|
2019-10-30 07:01:53 +00:00
|
|
|
elseif (OS_LINUX)
|
|
|
|
if (ARCH_AARCH64)
|
|
|
|
# FIXME: broken dependencies
|
|
|
|
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_PARQUET OFF CACHE INTERNAL "")
|
|
|
|
set (ENABLE_MYSQL OFF CACHE INTERNAL "")
|
|
|
|
endif ()
|
2019-10-02 14:35:07 +00:00
|
|
|
else ()
|
2019-10-30 07:01:53 +00:00
|
|
|
message (FATAL_ERROR "Trying to cross-compile to unsupported system: ${CMAKE_SYSTEM_NAME}!")
|
2019-08-30 16:50:43 +00:00
|
|
|
endif ()
|
2019-09-11 10:01:38 +00:00
|
|
|
|
|
|
|
# Don't know why but CXX_STANDARD doesn't work for cross-compilation
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
2019-10-30 07:01:53 +00:00
|
|
|
|
|
|
|
message (STATUS "Cross-compiling for target: ${CMAKE_CXX_COMPILE_TARGET}")
|
2019-08-30 16:50:43 +00:00
|
|
|
endif ()
|