Travis test gcc-7.2 and c++-17
This commit is contained in:
parent
dcf8730cf3
commit
6981abc440
6 changed files with 69 additions and 0 deletions
|
|
@ -279,6 +279,14 @@ matrix:
|
||||||
env: SWIGLANG=tcl SWIG_CC=gcc-6 SWIG_CXX=g++-6 CPP14=1
|
env: SWIGLANG=tcl SWIG_CC=gcc-6 SWIG_CXX=g++-6 CPP14=1
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
- os: linux
|
||||||
|
env: SWIGLANG=java SWIG_CC=gcc-7 SWIG_CXX=g++-7 CPP17=1
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
- os: linux
|
||||||
|
env: SWIGLANG=python SWIG_CC=gcc-7 SWIG_CXX=g++-7 CPP17=1
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
os: osx
|
os: osx
|
||||||
env: SWIGLANG=
|
env: SWIGLANG=
|
||||||
|
|
@ -349,6 +357,7 @@ install:
|
||||||
- if test "$TRAVIS_OS_NAME" = "osx"; then source Tools/travis-osx-install.sh; fi
|
- if test "$TRAVIS_OS_NAME" = "osx"; then source Tools/travis-osx-install.sh; fi
|
||||||
- if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++11 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++11; fi
|
- if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++11 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++11; fi
|
||||||
- if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++14 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++14; fi
|
- if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++14 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++14; fi
|
||||||
|
- if test -n "$CPP17"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++17 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++17; fi
|
||||||
- ls -la $(which $CC)
|
- ls -la $(which $CC)
|
||||||
- ls -la $(which $CXX)
|
- ls -la $(which $CXX)
|
||||||
- $CC --version
|
- $CC --version
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,16 @@
|
||||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) final; // 'final' is a java keyword, renaming to '_final'
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) final; // 'final' is a java keyword, renaming to '_final'
|
||||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) override; // 'override' is a C# keyword, renaming to '_override'
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) override; // 'override' is a C# keyword, renaming to '_override'
|
||||||
|
|
||||||
|
%{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated in C++11
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
struct Base {
|
struct Base {
|
||||||
|
|
@ -131,3 +141,12 @@ void DerivedNoVirtualStruct::cd() {}
|
||||||
void DerivedNoVirtualStruct::ef() {}
|
void DerivedNoVirtualStruct::ef() {}
|
||||||
DerivedNoVirtualStruct::~DerivedNoVirtualStruct() {}
|
DerivedNoVirtualStruct::~DerivedNoVirtualStruct() {}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,16 @@
|
||||||
%warnfilter(SWIGWARN_CPP11_LAMBDA) Space1::lambda19;
|
%warnfilter(SWIGWARN_CPP11_LAMBDA) Space1::lambda19;
|
||||||
%warnfilter(SWIGWARN_CPP11_LAMBDA) Space1::Space2::lambda20;
|
%warnfilter(SWIGWARN_CPP11_LAMBDA) Space1::Space2::lambda20;
|
||||||
|
|
||||||
|
%{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated in C++11
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
/* Defined lambda function with return value. */
|
/* Defined lambda function with return value. */
|
||||||
auto lambda1 = [](int x, int y) -> int { return x+y; };
|
auto lambda1 = [](int x, int y) -> int { return x+y; };
|
||||||
|
|
@ -105,3 +115,11 @@ int lambda102 = [] (int a, int b) mutable { return a + b; }(1, 2);
|
||||||
void lambda_init(int = ([=]{ return 0; })());
|
void lambda_init(int = ([=]{ return 0; })());
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
#endif
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated in C++11
|
||||||
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
@ -49,3 +53,11 @@ class Impl
|
||||||
#warning "UTL needs fixing for partial exception information"
|
#warning "UTL needs fixing for partial exception information"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
%{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ template<class T> class vector {
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
#endif
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated in C++11
|
||||||
|
#endif
|
||||||
|
|
||||||
class Base {
|
class Base {
|
||||||
public:
|
public:
|
||||||
|
|
@ -70,6 +74,9 @@ public:
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||||
#endif
|
#endif
|
||||||
|
#if __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%template(maxint) maximum<int>;
|
%template(maxint) maximum<int>;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ elif [[ "$CC" == gcc-6 ]]; then
|
||||||
travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
travis_retry sudo apt-get -qq update
|
travis_retry sudo apt-get -qq update
|
||||||
travis_retry sudo apt-get install -qq g++-6
|
travis_retry sudo apt-get install -qq g++-6
|
||||||
|
elif [[ "$CC" == gcc-7 ]]; then
|
||||||
|
travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
|
travis_retry sudo apt-get -qq update
|
||||||
|
travis_retry sudo apt-get install -qq g++-7
|
||||||
fi
|
fi
|
||||||
|
|
||||||
travis_retry sudo apt-get -qq install libboost-dev
|
travis_retry sudo apt-get -qq install libboost-dev
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue