summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 19:21:11 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 19:21:11 +0300
commit5c964f3246e8dee28afd2686c8b37ebb7b6f3b0c (patch)
tree88fd0b7c7082b7357762d2cd8322dc84f7ed6b45
parentDecrease button's animation duration (diff)
downloadnheko-5c964f3246e8dee28afd2686c8b37ebb7b6f3b0c.tar.xz
Update CI
-rwxr-xr-x.ci/linux.sh3
-rw-r--r--CMakeLists.txt13
-rw-r--r--README.md5
3 files changed, 15 insertions, 6 deletions
diff --git a/.ci/linux.sh b/.ci/linux.sh
index 84b54ebc..262870bf 100755
--- a/.ci/linux.sh
+++ b/.ci/linux.sh
@@ -1,7 +1,6 @@
 #!/usr/bin/env bash
 
-sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
 sudo add-apt-repository -y ppa:beineri/opt-qt562-trusty
 sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
 sudo apt-get update -qq
-sudo apt-get install -qq -y gcc-6 g++-6 clang qt56base cmake
+sudo apt-get install -qq -y qt56base cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 353333d0..492c5f74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,9 +52,20 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
         -Wall \
         -Wextra \
         -Werror \
-        -fdiagnostics-color=always \
         -pedantic \
         -Wunreachable-code")
+
+    if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+        execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+
+        if (GCC_VERSION VERSION_GREATER 4.9)
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
+        endif()
+    endif()
+
+    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
+    endif()
 endif()
 
 set(SRC_FILES
diff --git a/README.md b/README.md
index bba5e2c3..edef3406 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ but you can of course receive and send messages in the rooms that you are a memb
 - CMake 3.1 or greater.
 - A compiler that supports C++11.
     - Clang 3.3 (or greater).
-    - GCC 5 (or greater).
+    - GCC 4.8 (or greater).
 
 ##### Arch Linux
 
@@ -27,11 +27,10 @@ $ sudo pacman -S qt5-base cmake gcc
 ##### Ubuntu 14.04
 
 ```bash
-$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
 $ sudo add-apt-repository ppa:beineri/opt-qt562-trusty
 $ sudo add-apt-repository ppa:george-edison55/cmake-3.x
 $ sudo apt-get update
-$ sudo apt-get install gcc-6 g++-6 clang qt56base cmake # or gcc-5 gcc++-5
+$ sudo apt-get install qt56base cmake
 ```
 
 ##### OSX (Xcode 7 or later)