aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /CMakeLists.txt
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt106
1 files changed, 104 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7407b7a58c..1324505561 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,108 @@ set(CMAKE_CXX_EXTENSIONS Off)
set(YDB_MAX_LINK_JOBS 5 CACHE STRING "Maximum parallel link jobs for Ninja generator")
set_property(GLOBAL PROPERTY JOB_POOLS link_jobs=${YDB_MAX_LINK_JOBS})
set(CMAKE_JOB_POOL_LINK link_jobs)
+set(CMAKE_C_FLAGS "\
+ -m64 \
+ -fexceptions \
+ -fno-common \
+ -fuse-init-array \
+ -fcolor-diagnostics \
+ -faligned-allocation \
+ -ffunction-sections \
+ -fdata-sections \
+ -Wall \
+ -Wextra \
+ -Wno-parentheses \
+ -Wno-implicit-const-int-float-conversion \
+ -Wno-unknown-warning-option \
+ -D_THREAD_SAFE \
+ -D_PTHREADS \
+ -D_REENTRANT \
+ -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 \
+ -DSSE_ENABLED=1 \
+ -DSSE3_ENABLED=1 \
+ -DSSSE3_ENABLED=1 \
+ -DSSE41_ENABLED=1 \
+ -DSSE42_ENABLED=1 \
+ -DPOPCNT_ENABLED=1 \
+ -DCX16_ENABLED=1 \
+ -D_libunwind_ \
+ -DLIBCXX_BUILDING_LIBCXXRT \
+ -msse2 \
+ -msse3 \
+ -mssse3 \
+ -msse4.1 \
+ -msse4.2 \
+ -mpopcnt \
+ -mcx16 \
+ "
+)
+set(CMAKE_CXX_FLAGS "\
+ -m64 \
+ -fexceptions \
+ -fno-common \
+ -fuse-init-array \
+ -fcolor-diagnostics \
+ -faligned-allocation \
+ -ffunction-sections \
+ -fdata-sections \
+ -Wall \
+ -Wextra \
+ -Wno-parentheses \
+ -Wno-implicit-const-int-float-conversion \
+ -Wno-unknown-warning-option \
+ -D_THREAD_SAFE \
+ -D_PTHREADS \
+ -D_REENTRANT \
+ -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 \
+ -DSSE_ENABLED=1 \
+ -DSSE3_ENABLED=1 \
+ -DSSSE3_ENABLED=1 \
+ -DSSE41_ENABLED=1 \
+ -DSSE42_ENABLED=1 \
+ -DPOPCNT_ENABLED=1 \
+ -DCX16_ENABLED=1 \
+ -D_libunwind_ \
+ -DLIBCXX_BUILDING_LIBCXXRT \
+ -msse2 \
+ -msse3 \
+ -mssse3 \
+ -msse4.1 \
+ -msse4.2 \
+ -mpopcnt \
+ -mcx16 \
+ -Woverloaded-virtual \
+ -Wimport-preprocessor-directive-pedantic \
+ -Wno-undefined-var-template \
+ -Wno-return-std-move \
+ -Wno-address-of-packed-member \
+ -Wno-defaulted-function-deleted \
+ -Wno-pessimizing-move \
+ -Wno-range-loop-construct \
+ -Wno-deprecated-anon-enum-enum-conversion \
+ -Wno-deprecated-enum-enum-conversion \
+ -Wno-deprecated-enum-float-conversion \
+ -Wno-ambiguous-reversed-operator \
+ -Wno-deprecated-volatile \
+ "
+)
+add_link_options(
+ -nodefaultlibs
+ -lc
+ -lm
+)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
@@ -23,7 +125,7 @@ enable_testing()
include(cmake/antlr.cmake)
include(cmake/bison.cmake)
include(cmake/conan.cmake)
-include(cmake/global_flags.cmake)
+include(cmake/llvm-tools.cmake)
include(cmake/protobuf.cmake)
include(cmake/yandex_common.cmake)
include(cmake/global_vars.cmake)
@@ -55,7 +157,7 @@ conan_cmake_install(
SETTINGS ${settings}
)
-if (UNIX AND NOT APPLE)
+if (UNIX)
include(CMakeLists.linux.txt)
elseif (APPLE)
include(CMakeLists.darwin.txt)