mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-03 00:15:46 +00:00
Merge pull request #47 from Cat-Ion/travis
Travis-CI integration. Closes #11
This commit is contained in:
commit
ce4e76a3a1
3 changed files with 66 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,3 +23,4 @@ bin/*
|
||||||
*.diff
|
*.diff
|
||||||
|
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
!.travis.yml
|
||||||
|
|
51
.travis.yml
Normal file
51
.travis.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# http://docs.travis-ci.com/user/build-configuration/
|
||||||
|
language: cpp
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
#matrix:
|
||||||
|
|
||||||
|
#branches:
|
||||||
|
# only:
|
||||||
|
# - master
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libopenal-dev
|
||||||
|
- libsdl-dev
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl openal-soft; fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
# ALL THE BUILD COMMANDS HERE
|
||||||
|
- export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/usr/lib/x86_64-linux-gnu/"
|
||||||
|
- CMAKE_OPTIONS='-DCMAKE_PREFIX_PATH='"$CMAKE_PREFIX_PATH"' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAQUARIA_INTERNAL_FREETYPE=OFF -DAQUARIA_INTERNAL_LUA=OFF -DAQUARIA_INTERNAL_OGGVORBIS=OFF -DAQUARIA_INTERNAL_OPENAL=OFF -DAQUARIA_INTERNAL_PNG=OFF -DAQUARIA_INTERNAL_SDL=OFF -DAQUARIA_INTERNAL_TINYXML2=OFF -DAQUARIA_INTERNAL_ZLIB=OFF'
|
||||||
|
- rm -rf cmake-build
|
||||||
|
- mkdir cmake-build
|
||||||
|
- cd cmake-build
|
||||||
|
- cmake $CMAKE_OPTIONS ..
|
||||||
|
- make -j 2
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
irc:
|
||||||
|
channels:
|
||||||
|
- "irc.esper.net#bitblot"
|
||||||
|
skip_join: true
|
||||||
|
use_notice: true
|
||||||
|
template:
|
||||||
|
#- "[%{commit}: %{author}] %{message}"
|
||||||
|
#- "%{build_url}"
|
||||||
|
- "[%{repository_slug}#%{branch} @%{commit}] (%{author}): %{message}"
|
||||||
|
- "Diff: %{compare_url}"
|
||||||
|
- "Build: %{build_url}"
|
|
@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
PROJECT(Aquaria)
|
PROJECT(Aquaria)
|
||||||
|
|
||||||
INCLUDE(CheckCCompilerFlag)
|
INCLUDE(CheckCCompilerFlag)
|
||||||
|
INCLUDE(CheckCXXCompilerFlag)
|
||||||
INCLUDE(CheckFunctionExists)
|
INCLUDE(CheckFunctionExists)
|
||||||
|
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
@ -381,8 +382,19 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -pedantic")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -pedantic")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -std=gnu99")
|
||||||
|
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++11" AQUARIA_CC_HAS_GNUXX11)
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++1x" AQUARIA_CC_HAS_GNUXX1X)
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" AQUARIA_CC_HAS_GNUXX0X)
|
||||||
|
IF(AQUARIA_CC_HAS_GNUXX11)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||||
|
ELSEIF(AQUARIA_CC_HAS_GNUXX1X)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1x")
|
||||||
|
ELSEIF(AQUARIA_CC_HAS_GNUXX0X)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
||||||
|
ENDIF(AQUARIA_CC_HAS_GNUXX11)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||||
IF(HAVE_STRCASECMP)
|
IF(HAVE_STRCASECMP)
|
||||||
|
|
Loading…
Reference in a new issue