Add more compilers to CI
Fix (some) of the compiler errors with them
This commit is contained in:
parent
22e42a66f4
commit
97e1271e5e
99
.travis.yml
99
.travis.yml
@ -1,10 +1,19 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required # the doc target uses sudo to install dependencies
|
sudo: false
|
||||||
|
|
||||||
os:
|
os: linux
|
||||||
- linux
|
|
||||||
- osx
|
git:
|
||||||
|
depth: 1
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
sources: &apt_sources
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-6
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@ -12,16 +21,65 @@ env:
|
|||||||
a1eovNn4uol9won7ghr67eD3/59oeESN+G9bWE+ecI1V6yRseG9whniGhIpC/YfMW/Qz5I
|
a1eovNn4uol9won7ghr67eD3/59oeESN+G9bWE+ecI1V6yRseG9whniGhIpC/YfMW/Qz5I
|
||||||
5sxSmFjaw9bxCISNwUIrL1O5x2AmRYTnFcXk4dFsUvlZg+WeF/aKyBYCNRM8C2ndbBmtAO
|
5sxSmFjaw9bxCISNwUIrL1O5x2AmRYTnFcXk4dFsUvlZg+WeF/aKyBYCNRM8C2ndbBmtAO
|
||||||
o1F2EwFbiso0EmtzhAPs19ujiVxkLn4=
|
o1F2EwFbiso0EmtzhAPs19ujiVxkLn4=
|
||||||
matrix:
|
|
||||||
- BUILD=Doc
|
|
||||||
- BUILD=Debug STANDARD=14
|
|
||||||
- BUILD=Release STANDARD=14
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- os: osx
|
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||||
env: BUILD=Doc
|
|
||||||
include:
|
include:
|
||||||
|
# Documentation
|
||||||
|
- env: CXX_COMPILER=g++-6 BUILD=Doc
|
||||||
|
sudo: required
|
||||||
|
compiler: gcc
|
||||||
|
# g++ 6 on Linux with C++14
|
||||||
|
- env: CXX_COMPILER=g++-6 BUILD=Debug STANDARD=14
|
||||||
|
compiler: gcc
|
||||||
|
- env: CXX_COMPILER=g++-6 BUILD=Release STANDARD=14
|
||||||
|
compiler: gcc
|
||||||
|
# Apple clang on OS X with C++14
|
||||||
|
- env: BUILD=Debug STANDARD=14
|
||||||
|
compiler: clang
|
||||||
|
os: osx
|
||||||
|
- env: BUILD=Release STANDARD=14
|
||||||
|
compiler: clang
|
||||||
|
os: osx
|
||||||
|
# clang 6.0 on Linux with C++14
|
||||||
|
- env: CXX_COMPILER=clang++-6.0 BUILD=Debug STANDARD=14
|
||||||
|
compiler: clang
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- clang-6.0
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-trusty
|
||||||
|
- llvm-toolchain-trusty-6.0
|
||||||
|
# clang 4.0 on Linux with C++14
|
||||||
|
- env: CXX_COMPILER=clang++-4.0 BUILD=Debug STANDARD=11
|
||||||
|
compiler: clang
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- clang-4.0
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-trusty
|
||||||
|
- llvm-toolchain-trusty-4.0
|
||||||
|
# g++ 4.8 on Linux with C++11
|
||||||
|
- env: CXX_COMPILER=g++-4.8 BUILD=Debug STANDARD=11
|
||||||
|
compiler: gcc
|
||||||
|
# g++ 4.4 on Linux with C++11
|
||||||
|
- env: CXX_COMPILER=g++-4.4 BUILD=Debug STANDARD=0x
|
||||||
|
compiler: gcc
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- g++-4.4
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
# Android
|
||||||
- language: android
|
- language: android
|
||||||
android:
|
android:
|
||||||
components:
|
components:
|
||||||
@ -51,17 +109,20 @@ matrix:
|
|||||||
after_success:
|
after_success:
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
- tree ./libs
|
- tree ./libs
|
||||||
|
allow_failures:
|
||||||
|
# Errors
|
||||||
|
- env: CXX_COMPILER=g++-4.4 BUILD=Debug STANDARD=0x
|
||||||
|
compiler: gcc
|
||||||
|
|
||||||
# Install gcc-6 for extended constexpr support.
|
install:
|
||||||
addons:
|
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
||||||
apt:
|
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- g++-6
|
|
||||||
|
|
||||||
before_install:
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=g++-6; fi
|
|
||||||
|
before_script:
|
||||||
|
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then export CXX=${CXX_COMPILER}; fi
|
||||||
|
- ${CXX} --version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- support/travis-build.py
|
- support/travis-build.py
|
||||||
|
|||||||
@ -66,7 +66,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|||||||
-Wcast-qual -Wformat=2 -Wmissing-include-dirs
|
-Wcast-qual -Wformat=2 -Wmissing-include-dirs
|
||||||
-Wcast-align -Wnon-virtual-dtor
|
-Wcast-align -Wnon-virtual-dtor
|
||||||
-Wctor-dtor-privacy -Wdisabled-optimization
|
-Wctor-dtor-privacy -Wdisabled-optimization
|
||||||
-Winvalid-pch -Wmissing-declarations -Woverloaded-virtual)
|
-Winvalid-pch -Wmissing-declarations -Woverloaded-virtual
|
||||||
|
-Wno-sign-conversion -Wno-shadow)
|
||||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
||||||
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept)
|
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@ -219,7 +219,7 @@ class basic_string_view {
|
|||||||
#else
|
#else
|
||||||
struct type {
|
struct type {
|
||||||
const char *data() const { return FMT_NULL; }
|
const char *data() const { return FMT_NULL; }
|
||||||
size_t size() const { return 0; };
|
size_t size() const { return 0; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ struct typed_value : value<Context> {
|
|||||||
template <typename Context, typename T>
|
template <typename Context, typename T>
|
||||||
FMT_CONSTEXPR basic_format_arg<Context> make_arg(const T &value);
|
FMT_CONSTEXPR basic_format_arg<Context> make_arg(const T &value);
|
||||||
|
|
||||||
#if FMT_GCC_VERSION
|
#if FMT_GCC_VERSION >= 406
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||||
#endif
|
#endif
|
||||||
@ -629,7 +629,7 @@ FMT_MAKE_VALUE(pointer_type, const void*, const void*)
|
|||||||
FMT_MAKE_VALUE(pointer_type, std::nullptr_t, const void*)
|
FMT_MAKE_VALUE(pointer_type, std::nullptr_t, const void*)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FMT_GCC_VERSION
|
#if FMT_GCC_VERSION >= 406
|
||||||
// -Wuseless-cast
|
// -Wuseless-cast
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -45,12 +45,6 @@
|
|||||||
# define FMT_CATCH(x) if (false)
|
# define FMT_CATCH(x) if (false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
// Disable the warning about declaration shadowing because it affects too
|
|
||||||
// many valid cases.
|
|
||||||
# pragma GCC diagnostic ignored "-Wshadow"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable: 4127) // conditional expression is constant
|
# pragma warning(disable: 4127) // conditional expression is constant
|
||||||
@ -228,7 +222,7 @@ FMT_FUNC void system_error::init(
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
#ifdef __GNUC__
|
#if FMT_GCC_VERSION >= 406 || FMT_CLANG_VERSION
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
#endif
|
#endif
|
||||||
@ -261,7 +255,7 @@ int char_traits<wchar_t>::format_float(
|
|||||||
FMT_SWPRINTF(buffer, size, format, width, precision, value);
|
FMT_SWPRINTF(buffer, size, format, width, precision, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if FMT_GCC_VERSION >= 406 || FMT_CLANG_VERSION
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -318,7 +318,7 @@ fp operator*(fp x, fp y);
|
|||||||
// Compute k such that its cached power c_k = c_k.f * pow(2, c_k.e) satisfies
|
// Compute k such that its cached power c_k = c_k.f * pow(2, c_k.e) satisfies
|
||||||
// min_exponent <= c_k.e + e <= min_exponent + 3.
|
// min_exponent <= c_k.e + e <= min_exponent + 3.
|
||||||
inline int compute_cached_power_index(int e, int min_exponent) {
|
inline int compute_cached_power_index(int e, int min_exponent) {
|
||||||
constexpr double one_over_log2_10 = 0.30102999566398114; // 1 / log2(10)
|
FMT_CONSTEXPR_DECL double one_over_log2_10 = 0.30102999566398114; // 1 / log2(10)
|
||||||
return static_cast<int>(std::ceil((min_exponent - e + 63) * one_over_log2_10));
|
return static_cast<int>(std::ceil((min_exponent - e + 63) * one_over_log2_10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user