diff options
-rw-r--r-- | .travis.yml | 32 | ||||
-rw-r--r-- | INSTALL.md | 2 | ||||
-rw-r--r-- | mbgl.gypi | 7 | ||||
-rw-r--r-- | platform/default/image.cpp | 7 | ||||
-rw-r--r-- | platform/default/sqlite3.cpp | 6 | ||||
-rw-r--r-- | platform/linux/README.md | 6 | ||||
-rwxr-xr-x | platform/linux/scripts/coveralls.sh | 2 | ||||
-rw-r--r-- | platform/qt/platform.gyp | 8 | ||||
-rw-r--r-- | src/mbgl/util/compression.cpp | 7 |
9 files changed, 33 insertions, 44 deletions
diff --git a/.travis.yml b/.travis.yml index b2e959f8e7..e4a5d8debe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,19 +8,19 @@ addons_shortcuts: sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] packages: [ 'gdb', 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] - addons_gcc49: &gcc49 + addons_gcc5: &gcc5 apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'gdb', 'g++-4.9', 'gcc-4.9', 'libllvm3.4', 'xutils-dev', + packages: [ 'gdb', 'g++-5', 'gcc-5', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] addons_qt4: &qt4 apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'gdb', 'g++-4.9', 'gcc-4.9', 'mesa-utils', 'qt4-default' ] + packages: [ 'gdb', 'g++-5', 'gcc-5', 'mesa-utils', 'qt4-default' ] addons_qt5: &qt5 apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'gdb', 'g++-4.9', 'gcc-4.9', 'mesa-utils', 'qt5-default', 'libqt5opengl5-dev', 'qtdeclarative5-dev' ] + packages: [ 'gdb', 'g++-5', 'gcc-5', 'mesa-utils', 'qt5-default', 'libqt5opengl5-dev', 'qtdeclarative5-dev' ] env: global: @@ -62,24 +62,24 @@ matrix: - ccache --show-stats - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER} ${TRAVIS_TAG:-} - # GCC 4.9 - Debug - Coverage + # GCC 5 - Debug - Coverage - os: linux sudo: false language: cpp - compiler: ": linux-gcc49-debug" - env: BUILDTYPE=Debug _CXX=g++-4.9 _CC=gcc-4.9 ENABLE_COVERAGE=1 - addons: *gcc49 + compiler: ": linux-gcc5-debug" + env: BUILDTYPE=Debug _CXX=g++-5 _CC=gcc-5 ENABLE_COVERAGE=1 + addons: *gcc5 after_script: - ccache --show-stats - ./platform/linux/scripts/coveralls.sh - # GCC 4.9 - Release + # GCC 5 - Release - os: linux sudo: false language: cpp - compiler: ": linux-gcc49-release" - env: BUILDTYPE=Release _CXX=g++-4.9 _CC=gcc-4.9 - addons: *gcc49 + compiler: ": linux-gcc5-release" + env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 + addons: *gcc5 # Clang 3.5 - Debug - os: linux @@ -101,8 +101,8 @@ matrix: - os: linux sudo: false language: cpp - compiler: ": linux-gcc49-release" - env: FLAVOR=qt4 BUILDTYPE=Release _CXX=g++-4.9 _CC=gcc-4.9 + compiler: ": linux-gcc5-release" + env: FLAVOR=qt4 BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 addons: *qt4 script: - make qt-app test-qt @@ -112,8 +112,8 @@ matrix: sudo: required dist: trusty language: cpp - compiler: ": linux-gcc49-release" - env: FLAVOR=qt5 BUILDTYPE=Release _CXX=g++-4.9 _CC=gcc-4.9 + compiler: ": linux-gcc5-release" + env: FLAVOR=qt5 BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 addons: *qt5 before_install: - sudo apt-get install -y qtpositioning5-dev diff --git a/INSTALL.md b/INSTALL.md index 84bfc9b5af..f46e2e4232 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -30,7 +30,7 @@ targets. - Modern C++ compiler that supports `-std=c++14` - clang++ 3.5 or later _or_ - - g++-4.9 or later + - g++-5 or later - Python 2.x (for build only) - [`pkg-config`](https://wiki.freedesktop.org/www/Software/pkg-config/) (for build only) - [`libtool`](https://www.gnu.org/software/libtool/) (for build only) @@ -43,13 +43,6 @@ 'cflags_cc': [ '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin. ], - 'conditions': [ - ['cxx_host != "clang"', { - 'cflags_cc': [ - '-fabi-version=0', - ], - }], - ] }], ], 'target_conditions': [ diff --git a/platform/default/image.cpp b/platform/default/image.cpp index 71fb5414b3..2195a999c9 100644 --- a/platform/default/image.cpp +++ b/platform/default/image.cpp @@ -4,10 +4,7 @@ #include <png.h> -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -// Check png library version. -const static bool png_version_check = []() { +const static bool png_version_check __attribute__((unused)) = []() { const png_uint_32 version = png_access_version_number(); if (version != PNG_LIBPNG_VER) { throw std::runtime_error(mbgl::util::sprintf<96>( @@ -17,7 +14,7 @@ const static bool png_version_check = []() { } return true; }(); -#pragma GCC diagnostic pop + namespace mbgl { std::string encodePNG(const PremultipliedImage& pre) { diff --git a/platform/default/sqlite3.cpp b/platform/default/sqlite3.cpp index a5d619406f..505423d1fd 100644 --- a/platform/default/sqlite3.cpp +++ b/platform/default/sqlite3.cpp @@ -7,10 +7,7 @@ #include <chrono> #include <experimental/optional> -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -// Check sqlite3 library version. -const static bool sqliteVersionCheck = []() { +const static bool sqliteVersionCheck __attribute__((unused)) = []() { if (sqlite3_libversion_number() / 1000000 != SQLITE_VERSION_NUMBER / 1000000) { char message[96]; snprintf(message, 96, @@ -21,7 +18,6 @@ const static bool sqliteVersionCheck = []() { return true; }(); -#pragma GCC diagnostic pop namespace mapbox { namespace sqlite { diff --git a/platform/linux/README.md b/platform/linux/README.md index 910edcb9a6..bb05284609 100644 --- a/platform/linux/README.md +++ b/platform/linux/README.md @@ -8,12 +8,12 @@ This process gives you a Linux desktop app built on a Linux host system. ### Build -Install GCC 4.9+ if you are running Ubuntu 14.04 or older. Alternatively, you can also use [Clang 3.5+](http://llvm.org/apt/). +Install GCC 5+ if you are running Ubuntu 14.04 or older. Alternatively, you can also use [Clang 3.5+](http://llvm.org/apt/). sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test sudo apt-get update - sudo apt-get install gcc-4.9 g++-4.9 - export CXX=g++-4.9 + sudo apt-get install gcc-5 g++-5 + export CXX=g++-5 Ensure you have git and other build essentials: diff --git a/platform/linux/scripts/coveralls.sh b/platform/linux/scripts/coveralls.sh index 1d8d9f060a..8d5903de6c 100755 --- a/platform/linux/scripts/coveralls.sh +++ b/platform/linux/scripts/coveralls.sh @@ -12,7 +12,7 @@ mapbox_time "lcov_capture" \ --quiet \ --capture \ --no-external \ - --gcov-tool "gcov-4.9" \ + --gcov-tool "gcov-5" \ --directory "src/mbgl" \ --directory "platform" \ --directory "include/mbgl" \ diff --git a/platform/qt/platform.gyp b/platform/qt/platform.gyp index 78b86df88a..a945615692 100644 --- a/platform/qt/platform.gyp +++ b/platform/qt/platform.gyp @@ -115,6 +115,14 @@ ], 'conditions': [ + ['<(qt_version_major) == 4', { + 'variables': { + 'cflags': [ + # Qt4 generates code with unused variables. + '-Wno-unused-variable', + ], + }, + }], ['<(qt_version_major) == 5', { 'variables': { 'cflags': [ diff --git a/src/mbgl/util/compression.cpp b/src/mbgl/util/compression.cpp index 5dc3f1127c..e189991b55 100644 --- a/src/mbgl/util/compression.cpp +++ b/src/mbgl/util/compression.cpp @@ -6,11 +6,8 @@ #include <cstring> #include <stdexcept> -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" - // Check zlib library version. -const static bool zlibVersionCheck = []() { +const static bool zlibVersionCheck __attribute__((unused)) = []() { const char *const version = zlibVersion(); if (version[0] != ZLIB_VERSION[0]) { char message[96]; @@ -22,8 +19,6 @@ const static bool zlibVersionCheck = []() { return true; }(); -#pragma GCC diagnostic pop - namespace mbgl { namespace util { |