From 472ed39bfbb0fa559671247a36d213cdaf8a57c3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 29 May 2018 22:48:28 +0200 Subject: [PATCH] CI environment: adapt for C++11 capable environments --- .travis.yml | 13 ++++++++----- appveyor.yml | 17 ----------------- travis/csa/install.sh | 2 +- travis/linux_clang/install.sh | 2 +- travis/linux_gcc/before_install.sh | 1 + travis/linux_gcc/install.sh | 2 +- travis/mingw32/before_install.sh | 8 ++++++-- travis/mingw32/install.sh | 4 ++-- travis/osx/install.sh | 2 +- 9 files changed, 21 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index b33d4c2fb5..86545b14db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,9 @@ matrix: include: - os: linux + dist: trusty compiler: gcc - language: c + language: cpp sudo: required services: - docker @@ -19,8 +20,9 @@ matrix: - BUILD_NAME=linux_gcc - DETAILS="linux, gcc" - os: linux + dist: trusty compiler: clang - language: c + language: cpp sudo: required services: - docker @@ -28,13 +30,14 @@ matrix: - BUILD_NAME=linux_clang - DETAILS="linux, clang" - os: osx - language: c + language: cpp env: - BUILD_NAME=osx - DETAILS="osx" - os: linux + dist: trusty compiler: gcc - language: c + language: cpp sudo: required env: - BUILD_NAME=mingw32 @@ -42,7 +45,7 @@ matrix: - os: linux compiler: gcc - language: c + language: cpp dist: trusty env: - BUILD_NAME=csa diff --git a/appveyor.yml b/appveyor.yml index f54155c56b..70d9b1e9fc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,23 +5,6 @@ platform: environment: matrix: -# Does not work -# VS 2008 -# - BUILD_TYPE: cmake -# VS_VERSION: Visual Studio 9 2008 - -# VS 2010 - - BUILD_TYPE: cmake - VS_VERSION: Visual Studio 10 - -# VS 2012 - - BUILD_TYPE: cmake - VS_VERSION: Visual Studio 11 - -# VS 2013 - - BUILD_TYPE: cmake - VS_VERSION: Visual Studio 12 - # VS 2015 - BUILD_TYPE: cmake VS_VERSION: Visual Studio 14 diff --git a/travis/csa/install.sh b/travis/csa/install.sh index 4b82606f1a..4df403e0ff 100755 --- a/travis/csa/install.sh +++ b/travis/csa/install.sh @@ -5,7 +5,7 @@ set -e # prepare build files ./autogen.sh -./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v ./configure +CXXFLAGS="-std=c++11" ./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v ./configure ./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v make -j3 if grep -r "\.c" scanbuildoutput | grep "" | grep -v ""; then echo "error" && /bin/false; else echo "ok"; fi diff --git a/travis/linux_clang/install.sh b/travis/linux_clang/install.sh index 32ce30f04b..a761cc5893 100755 --- a/travis/linux_clang/install.sh +++ b/travis/linux_clang/install.sh @@ -4,4 +4,4 @@ set -e export CCACHE_CPP2=yes -CC="ccache clang" CFLAGS="-std=c89 -Werror -fsanitize=address" ./travis/install.sh +CC="ccache clang" CXX="ccache clang++" CFLAGS="-std=c89 -Werror -fsanitize=address" CXXFLAGS="-Werror -fsanitize=address" ./travis/install.sh diff --git a/travis/linux_gcc/before_install.sh b/travis/linux_gcc/before_install.sh index c1d119d8ad..55516cd13d 100755 --- a/travis/linux_gcc/before_install.sh +++ b/travis/linux_gcc/before_install.sh @@ -2,6 +2,7 @@ ./travis/before_install.sh +sudo apt-get update -qq sudo apt-get install -y cppcheck set -e diff --git a/travis/linux_gcc/install.sh b/travis/linux_gcc/install.sh index 77e9a2e3f4..ad5caa9c71 100755 --- a/travis/linux_gcc/install.sh +++ b/travis/linux_gcc/install.sh @@ -4,4 +4,4 @@ set -e export CCACHE_CPP2=yes -CC="ccache gcc" CFLAGS="-std=c89 -Werror" ./travis/install.sh +CC="ccache gcc" CXX="ccache g++" CFLAGS="-std=c89 -Werror" CXXFLAGS="-Werror" ./travis/install.sh diff --git a/travis/mingw32/before_install.sh b/travis/mingw32/before_install.sh index 5cadb7612b..d335bb3a10 100755 --- a/travis/mingw32/before_install.sh +++ b/travis/mingw32/before_install.sh @@ -5,5 +5,9 @@ set -e ./travis/before_install.sh sudo apt-get update -qq -sudo apt-get install -qq wine -sudo apt-get install -qq mingw32 +sudo apt-get install binutils-mingw-w64-x86-64 +sudo apt-get install gcc-mingw-w64-x86-64 +sudo apt-get install g++-mingw-w64-x86-64 +sudo apt-get install g++-mingw-w64 +sudo apt-get install mingw-w64-tools +sudo apt-get install -y wine1.4-amd64 diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh index 49e395a530..c57b03d3bd 100755 --- a/travis/mingw32/install.sh +++ b/travis/mingw32/install.sh @@ -9,7 +9,7 @@ export CCACHE_CPP2=yes # autoconf build mkdir build_autoconf cd build_autoconf -CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install +CC="ccache x86_64-w64-mingw32-gcc" CXX="ccache x86_64-w64-mingw32-g++" LD=x86_64-w64-mingw32-ld ../configure --host=x86_64-w64-mingw32 --prefix=/tmp/proj_autoconf_install make -j3 make install make dist-all @@ -24,7 +24,7 @@ cd .. # autoconf build with grids mkdir build_autoconf_nad cd build_autoconf_nad -CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install_nad +CC="ccache x86_64-w64-mingw32-gcc" CXX="ccache x86_64-w64-mingw32-g++" LD=x86_64-w64-mingw32-ld ../configure --host=x86_64-w64-mingw32 --prefix=/tmp/proj_autoconf_install_nad make -j3 make install find /tmp/proj_autoconf_install_nad diff --git a/travis/osx/install.sh b/travis/osx/install.sh index 8c25e1f173..46bdbb2292 100755 --- a/travis/osx/install.sh +++ b/travis/osx/install.sh @@ -4,4 +4,4 @@ set -e export CCACHE_CPP2=yes -CC="ccache clang" CFLAGS="-std=c89 -g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -O2" ./travis/install.sh +CC="ccache clang" CXX="ccache clang++" CFLAGS="-Werror -O2" CXXFLAGS="-Werror -O2" ./travis/install.sh