aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/global_flags.cmake
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-28 11:06:00 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-28 11:06:00 +0300
commit140202a697f7a9d60b01de36c08f63ebd33fc5a9 (patch)
tree144de614dfa6c1288e7acde8c9584f376cff1263 /cmake/global_flags.cmake
parentd035a83fdacc62590460e2589854afeba02055b9 (diff)
downloadydb-140202a697f7a9d60b01de36c08f63ebd33fc5a9.tar.gz
intermediate changes
ref:91e6b243cd7f0c53cbafb4f654eced58a4c1e436
Diffstat (limited to 'cmake/global_flags.cmake')
-rw-r--r--cmake/global_flags.cmake106
1 files changed, 106 insertions, 0 deletions
diff --git a/cmake/global_flags.cmake b/cmake/global_flags.cmake
new file mode 100644
index 0000000000..699ae906ba
--- /dev/null
+++ b/cmake/global_flags.cmake
@@ -0,0 +1,106 @@
+set(CMAKE_C_FLAGS "\
+ -m64 \
+ -fexceptions \
+ -fno-common \
+ -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 \
+ -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
+)
+if (APPLE)
+ set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
+elseif(UNIX)
+ set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fuse-init-array)
+ set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fuse-init-array)
+endif()