mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Fixed compiler flags
This commit is contained in:
parent
3d9a81108d
commit
b99b1689b7
8 changed files with 11 additions and 28 deletions
|
@ -1,7 +1,3 @@
|
|||
if (ARCH_ID MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||
set(ARMv8 1)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
set(GENERAL_FLAGS "-pthread")
|
||||
|
||||
|
|
|
@ -24,22 +24,12 @@ set(CARES_SHARED OFF CACHE BOOL "Build as a shared library")
|
|||
set(CARES_INSTALL OFF CACHE BOOL "Create installation targets (chain builders may want to disable this)")
|
||||
set(CARES_BUILD_TOOLS OFF CACHE BOOL "Build tools")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -w")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -w")
|
||||
endif()
|
||||
|
||||
if ((CMAKE_C_COMPILER_ID MATCHES MSVC) OR (CMAKE_CXX_COMPILER_ID MATCHES MSVC))
|
||||
include_directories(external/src/common)
|
||||
endif()
|
||||
|
||||
add_definitions(-DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0)
|
||||
|
||||
add_subdirectory(external/src/grpc)
|
||||
set(LIBS ${LIBS} grpc grpc++ libprotobuf)
|
||||
|
||||
|
|
|
@ -11,3 +11,7 @@ if(NOT ARCH_ID)
|
|||
endif()
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_ID)
|
||||
endif()
|
||||
|
||||
if (ARCH_ID MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||
set(ARMv8 1)
|
||||
endif()
|
||||
|
|
2
external/src/Tari/CMakeLists.txt
vendored
2
external/src/Tari/CMakeLists.txt
vendored
|
@ -36,8 +36,6 @@ include_directories(../grpc/third_party/protobuf/src)
|
|||
include_directories(../grpc/include)
|
||||
include_directories(../grpc/third_party/abseil-cpp)
|
||||
|
||||
set(DISABLE_WARNINGS ON)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
|
||||
|
|
5
external/src/Tari/proto.h
vendored
5
external/src/Tari/proto.h
vendored
|
@ -2,9 +2,6 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 0)
|
||||
#elif __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wundef"
|
||||
#endif
|
||||
|
||||
#include "proto/gRPC/base_node.pb.h"
|
||||
|
@ -29,6 +26,4 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#elif __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
|
2
external/src/grpc
vendored
2
external/src/grpc
vendored
|
@ -1 +1 @@
|
|||
Subproject commit a10d860cccab6e0ee4de8e0cf4d976b1545a66e3
|
||||
Subproject commit 0de6f576b3b91c51eacc65ab0590694dbefa7663
|
|
@ -1,7 +1,3 @@
|
|||
if (ARCH_ID MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||
set(ARMv8 1)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
set(GENERAL_FLAGS "-pthread")
|
||||
set(WARNING_FLAGS "-Wall -Wextra")
|
||||
|
|
|
@ -11,3 +11,7 @@ if(NOT ARCH_ID)
|
|||
endif()
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_ID)
|
||||
endif()
|
||||
|
||||
if (ARCH_ID MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||
set(ARMv8 1)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue