Enables C++14 standard (was C++11) within the Solidity compiler project.

This commit is contained in:
Christian Parpart 2018-11-26 10:19:55 +01:00 committed by Daniel Kirchner
parent 055c5fe173
commit 5b86e3ec50
4 changed files with 36 additions and 15 deletions

View File

@ -55,6 +55,18 @@ matrix:
env:
- ZIP_SUFFIX=ubuntu-trusty
- SOLC_STOREBYTECODE=On
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo add-apt-repository -y ppa:hvr/z3
- sudo apt-get update -qq
install:
- sudo apt-get install -qq g++-8 gcc-8
- sudo apt-get install -qq libboost1.67-dev
- sudo apt-get install -qq libleveldb1
- sudo apt-get install -qq libz3-dev
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
- os: linux
dist: trusty
@ -63,6 +75,18 @@ matrix:
env:
- ZIP_SUFFIX=ubuntu-trusty-clang
- SOLC_STOREBYTECODE=On
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo add-apt-repository -y ppa:hvr/z3
- sudo apt-get update -qq
install:
- sudo apt-get install -qq g++-8 gcc-8
- sudo apt-get install -qq libboost1.67-dev
- sudo apt-get install -qq libleveldb1
- sudo apt-get install -qq libz3-dev
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
# Docker target, which generates a statically linked alpine image
- os: linux
@ -159,18 +183,15 @@ cache:
install:
- test $SOLC_INSTALL_DEPS_TRAVIS != On || (scripts/install_deps.sh)
- test "$TRAVIS_OS_NAME" != "linux" || (scripts/install_cmake.sh)
# Disable tests unless run on the release branch, on tags or with daily cron
#- if [ "$TRAVIS_BRANCH" != release -a -z "$TRAVIS_TAG" -a "$TRAVIS_EVENT_TYPE" != cron ]; then SOLC_TESTS=Off; fi
- SOLC_TESTS=Off
- if [ "$TRAVIS_BRANCH" = release -o -n "$TRAVIS_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
before_script:
# Disable tests unless run on the release branch, on tags or with daily cron
- if [ "$TRAVIS_BRANCH" != release -a -z "$TRAVIS_TAG" -a "$TRAVIS_EVENT_TYPE" != cron ]; then SOLC_TESTS=Off; fi
- if [ "$TRAVIS_BRANCH" = release -o -n "$TRAVIS_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
- test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
- test $SOLC_DOCKER != On || (scripts/docker_build.sh)
- test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
&& scripts/release.sh $ZIP_SUFFIX
&& scripts/create_source_tarball.sh)
- test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE -DBoost_USE_STATIC_LIBS=OFF && scripts/create_source_tarball.sh)
script:
- test $SOLC_EMSCRIPTEN != On -o $SOLC_TESTS != On || (scripts/test_emscripten.sh)
@ -204,7 +225,7 @@ deploy:
- release
- /^v\d/
# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit and the source tarball.
# which generates the source tarball.
#
# This runs for each tag that is created and adds the corresponding files.
- provider: releases

View File

@ -25,8 +25,8 @@ eth_add_cxx_compiler_flag_if_supported(-Wimplicit-fallthrough)
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
# Use ISO C++11 standard language.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Use ISO C++14 standard language.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
# Enables all the warnings about constructions that some users consider questionable,
# and that are easy to avoid. Also enable some extra warning flags that are not

View File

@ -15,9 +15,9 @@ set(JSONCPP_INCLUDE_DIR "${prefix}/include")
# versions used in the CI runs.
if(EMSCRIPTEN)
# Do not include all flags in CMAKE_CXX_FLAGS for emscripten,
# but only use -std=c++11. Using all flags causes build failures
# but only use -std=c++14. Using all flags causes build failures
# at the moment.
set(JSONCPP_CXX_FLAGS -std=c++11)
set(JSONCPP_CXX_FLAGS -std=c++14)
else()
set(JSONCPP_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()

View File

@ -114,7 +114,7 @@ Priority: extra
Maintainer: Christian (Buildserver key) <builds@ethereum.org>
Build-Depends: ${Z3DEPENDENCY}debhelper (>= 9.0.0),
cmake,
g++-4.8,
g++-8,
git,
libgmp-dev,
libboost-all-dev,
@ -168,7 +168,7 @@ override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
override_dh_auto_configure:
dh_auto_configure -- -DINSTALL_LLLC=Off
dh_auto_configure -- -DINSTALL_LLLC=Off -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
EOF
cat <<EOF > debian/copyright
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/