diff --git a/.travis/install-debian.sh b/.travis/install-debian.sh index 146190f0..6c11310e 100755 --- a/.travis/install-debian.sh +++ b/.travis/install-debian.sh @@ -1,7 +1,8 @@ #!/bin/sh -xe +sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update -qq sudo apt-get install -q -y \ cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev \ libgtkmm-2.4-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev libglew-dev \ - libfreetype6-dev dpkg-dev + libfreetype6-dev dpkg-dev gcc-5 g++-5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 27716d62..9aed589b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,13 @@ if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline") endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + # GCC 4.8/4.9 ship with broken but present . meh. + message(FATAL_ERROR "GCC 5.0+ is required") + endif() +endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-parameter") if(CMAKE_CXX_COMPILER_ID STREQUAL Clang) diff --git a/debian/rules b/debian/rules index 084b447b..95e8ea68 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,9 @@ include /usr/share/dpkg/default.mk override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \ - -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ + -DCMAKE_C_COMPILER=gcc-5 \ + -DCMAKE_CXX_COMPILER=g++-5 # create a -dbg package override_dh_strip: