Travis:add tests for more gcc versions (#199)

* travis:add tests for other versions of gcc

* cmakelists.txt:add c++11 flag by default, doesn't build using gcc-5

the llvm toolchain is needed for the clang-6.0 test.

Recently something changed on travis where adding the llvm toolchain by
using the "addons" directive in .travis.yml fails because
"allow-unauthenticated" isn't
passed, which seems to be the only way to add the repo. Moving that to
the script, and cleaning up the script a little.
This commit is contained in:
Andy Alt
2018-09-02 10:56:19 -05:00
committed by GitHub
parent 3646557a9f
commit 0410ad138f
4 changed files with 64 additions and 117 deletions

View File

@@ -7,14 +7,7 @@ SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
IF(BUILD_ZETAGLEST_MODEL_VIEWER)
MESSAGE(STATUS "Will try to build ZetaGlest model viewer")
IF(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 4.7 OR NOT "${CMAKE_CXX_COMPILER_VERSION}")
ADD_DEFINITIONS("-std=gnu++0x")
ELSEIF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 5.1)
ADD_DEFINITIONS("-std=c++11")
ENDIF()
# Was required at least on bsd and macos.
ENDIF()
ADD_DEFINITIONS("-std=c++11")
FIND_PACKAGE(${SDL_VERSION_NAME} REQUIRED)
INCLUDE_DIRECTORIES(${${SDL_VERSION_NAME}_INCLUDE_DIR})