CMake: require GCC 5.0+.

pull/10/head
whitequark 2016-05-18 16:44:03 +00:00
parent 63398ef3ba
commit d37d77a257
3 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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 <regex>. 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)

4
debian/rules vendored
View File

@ -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: