aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/global_flags.cmake
diff options
context:
space:
mode:
authorrobot-ya-builder <robot-ya-builder@yandex-team.com>2022-09-26 08:17:01 +0300
committerrobot-ya-builder <robot-ya-builder@yandex-team.com>2022-09-26 08:17:01 +0300
commit861d329b972f5db9d1cce78ba43bced3cb2bb06e (patch)
tree8750e046be91fb321a18e1f79e881a9a38c8f34c /cmake/global_flags.cmake
parent7e4be6d951751b3da88d4cf2b57559870c56d3ed (diff)
downloadydb-861d329b972f5db9d1cce78ba43bced3cb2bb06e.tar.gz
External build system generator release 10
Update tools: yexport
Diffstat (limited to 'cmake/global_flags.cmake')
-rw-r--r--cmake/global_flags.cmake13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmake/global_flags.cmake b/cmake/global_flags.cmake
index 653c6c1afa..5b8277f69e 100644
--- a/cmake/global_flags.cmake
+++ b/cmake/global_flags.cmake
@@ -42,7 +42,6 @@ set(CMAKE_CXX_FLAGS "\
-D_LARGEFILE_SOURCE \
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
- -D_FILE_OFFSET_BITS=64 \
-D_GNU_SOURCE \
-D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE \
-D__LONG_LONG_SUPPORTED \
@@ -75,6 +74,12 @@ elseif(UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-init-array")
endif()
+if (ANDROID)
+ include_directories(SYSTEM ${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include)
+else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
+endif()
+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(CMAKE_CXX_FLAGS "\
${CMAKE_CXX_FLAGS} \
@@ -113,3 +118,9 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-DCX16_ENABLED=1 \
")
endif()
+
+if (NOT CMAKE_CROSSCOMPILING)
+ set(TOOLS_ROOT ${CMAKE_BINARY_DIR})
+elseif(NOT TOOLS_ROOT)
+ message(FATAL_ERROR "TOOLS_ROOT is required for crosscompilation")
+endif()