mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Adjust Mac OS non-arm build for upgraded abseil (#416)
* Update and rename ubuntu-18.04-compile.yml to ubuntu-compile.yml * Update ubuntu-compile.yml segregate output binaries * Update macos-10.15-compile.yml Add testnet branch to github action and compilation flag -std=c++17 * Update macos-10.15-compile.yml remove branch filter * Update windows2019x64-compile.yml * Update windows2019x64-compile.yml add flag /std:c++17 * Update windows2019x64-compile.yml * Update windows2019x64-compile.yml * Update ubuntu-compile.yml Add -DCMAKE_CXX_FLAGS="-std=c++17" * use CMAKE_CXX_STANDARD * Update macos-10.15-compile.yml remove -std=c++17 flag * Update ubuntu-compile.yml remove -DCMAKE_CXX_FLAGS="-std=c++17" flag * Update ubuntu-compile.yml remove space * Update ubuntu-18.04-ton-ccpcheck.yml remove branch filter * Update docker-ubuntu-image.yml remove branch filter Co-authored-by: dungeon-master-666 <dungeon666master@protonmail.com>
This commit is contained in:
parent
90e06e3394
commit
fecf760aae
4 changed files with 10 additions and 33 deletions
2
.github/workflows/docker-ubuntu-image.yml
vendored
2
.github/workflows/docker-ubuntu-image.yml
vendored
|
@ -3,8 +3,6 @@ name: Docker Ubuntu 18.04 image
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
|
|
2
.github/workflows/macos-10.15-compile.yml
vendored
2
.github/workflows/macos-10.15-compile.yml
vendored
|
@ -3,8 +3,6 @@ name: C/C++ CI macOS-10.15 Compile
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -3,8 +3,6 @@ name: Ubuntu 18.04 TON ccpcheck
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project(TON VERSION 0.5 LANGUAGES C CXX)
|
project(TON VERSION 0.5 LANGUAGES C CXX)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
@ -79,6 +79,10 @@ else()
|
||||||
set(HAVE_SSE42 FALSE)
|
set(HAVE_SSE42 FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||||
|
|
||||||
#BEGIN internal
|
#BEGIN internal
|
||||||
option(TON_ONLY_TONLIB "Use \"ON\" to build only tonlib." OFF)
|
option(TON_ONLY_TONLIB "Use \"ON\" to build only tonlib." OFF)
|
||||||
if (TON_ONLY_TONLIB)
|
if (TON_ONLY_TONLIB)
|
||||||
|
@ -99,6 +103,7 @@ set(TON_ARCH "native" CACHE STRING "Architecture, will be passed to -march=")
|
||||||
|
|
||||||
if (TON_USE_ABSEIL)
|
if (TON_USE_ABSEIL)
|
||||||
message("Add abseil-cpp")
|
message("Add abseil-cpp")
|
||||||
|
set(ABSL_PROPAGATE_CXX_STD TRUE)
|
||||||
add_subdirectory(third-party/abseil-cpp EXCLUDE_FROM_ALL)
|
add_subdirectory(third-party/abseil-cpp EXCLUDE_FROM_ALL)
|
||||||
set(ABSL_FOUND 1)
|
set(ABSL_FOUND 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -178,26 +183,6 @@ endif()
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
if (GCC OR CLANG OR INTEL)
|
|
||||||
if (WIN32 AND INTEL)
|
|
||||||
set(STD14_FLAG /Qstd=c++14)
|
|
||||||
else()
|
|
||||||
set(STD14_FLAG -std=c++14)
|
|
||||||
endif()
|
|
||||||
check_cxx_compiler_flag(${STD14_FLAG} HAVE_STD14)
|
|
||||||
if (NOT HAVE_STD14)
|
|
||||||
string(REPLACE "c++14" "c++1y" STD14_FLAG "${STD14_FLAG}")
|
|
||||||
check_cxx_compiler_flag(${STD14_FLAG} HAVE_STD1Y)
|
|
||||||
set(HAVE_STD14 ${HAVE_STD1Y})
|
|
||||||
endif()
|
|
||||||
elseif (MSVC)
|
|
||||||
set(HAVE_STD14 MSVC_VERSION>=1900)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT HAVE_STD14)
|
|
||||||
message(FATAL_ERROR "No C++14 support in the compiler. Please upgrade the compiler.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
@ -238,7 +223,7 @@ if (MSVC)
|
||||||
add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /wd4100 /wd4127 /wd4324 /wd4456 /wd4457 /wd4458 /wd4505 /wd4702")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /wd4100 /wd4127 /wd4324 /wd4456 /wd4457 /wd4458 /wd4505 /wd4702")
|
||||||
elseif (CLANG OR GCC)
|
elseif (CLANG OR GCC)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STD14_FLAG} -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
#use "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/export_list" for exported symbols
|
#use "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/export_list" for exported symbols
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility=hidden -Wl,-dead_strip,-x,-S")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility=hidden -Wl,-dead_strip,-x,-S")
|
||||||
|
@ -251,8 +236,6 @@ elseif (CLANG OR GCC)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--exclude-libs,ALL")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--exclude-libs,ALL")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (INTEL)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STD14_FLAG}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue