From 18098074edbe4e87132367e25ede5ed38cf54483 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 8 Aug 2018 23:06:10 -0500 Subject: [PATCH] Update to gcc 4.9 for Travis CI runs --- .travis.yml | 13 ++++++++++--- CMakeLists.txt | 4 ++-- docs/source/devguide/styleguide.rst | 4 +--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index de83325e03..5805534f9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,14 @@ python: - "3.6" addons: apt: + sources: + - ubuntu-toolchain-r-test packages: - - gfortran - - mpich - - libmpich-dev + - gcc-4.9 + - g++-4.9 + - gfortran-4.9 + - mpich + - libmpich-dev cache: directories: - $HOME/nndc_hdf5 @@ -26,6 +30,9 @@ env: - OPENMC_MULTIPOLE_LIBRARY=$HOME/multipole_lib - PATH=$PATH:$HOME/NJOY2016/build - DISPLAY=:99.0 + - CC=gcc-4.9 + - CXX=g++-4.9 + - FC=gfortran-4.9 matrix: - OMP=n MPI=n PHDF5=n - OMP=y MPI=n PHDF5=n diff --git a/CMakeLists.txt b/CMakeLists.txt index a5a760a898..dc9a1231ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,8 +84,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) # Make sure version is sufficient execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if(GCC_VERSION VERSION_LESS 4.8) - message(FATAL_ERROR "gfortran version must be 4.8 or higher") + if(GCC_VERSION VERSION_LESS 4.9) + message(FATAL_ERROR "gcc version must be 4.9 or higher") endif() # GCC compiler options diff --git a/docs/source/devguide/styleguide.rst b/docs/source/devguide/styleguide.rst index e0e67a6d62..2b366c191e 100644 --- a/docs/source/devguide/styleguide.rst +++ b/docs/source/devguide/styleguide.rst @@ -174,9 +174,7 @@ Follow the `C++ Core Guidelines`_ except when they conflict with another guideline listed here. For convenience, many important guidelines from that list are repeated here. -Conform to the C++11 standard. Note that this is a significant difference -between our style and the C++ Core Guidelines. Many suggestions in those -Guidelines require C++14. +Conform to the C++14 standard. Always use C++-style comments (``//``) as opposed to C-style (``/**/``). (It is more difficult to comment out a large section of code that uses C-style