Skip to content

Commit

Permalink
Updated CMake for Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellivingston committed Apr 16, 2019
1 parent e62675a commit c1ab5de
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
22 changes: 21 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,32 @@ branches:
# Install dependencies for various OS'
before_install:
- if [ $TRAVIS_OS_NAME = windows ]; then choco install make cmake; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -y -f --allow-unauthenticated install gfortran libz-dev m4 bison python3 cmake && sudo apt-get upgrade cmake; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get purge cmake && sudo apt-key update && sudo apt-get update && sudo apt-get -y -f install gfortran libz-dev m4 bison python3 cmake; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew install gcc; fi
- export FC=$(which gfortran); echo $FC
- export CC=$(which gcc); echo $CC
- export CXX=$(which g++); echo $CXX

install:
############################################################################
# Install a recent CMake
############################################################################
- DEPS_DIR="${HOME}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}

- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew install cmake || brew upgrade cmake
fi
- cd -
- cmake --version
#- ./cmake-config
#- cd ${TRAVIS_BUILD_DIR}

# Build Exodus and binary; test
script:
# LaGriT compilation tests
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ ifeq ($(DEBUG),1)
LINKERFLAGS += -g -fbacktrace -ffpe-trap=invalid,zero,overflow,underflow,denormal
BUILDFLAGS += -g -fbacktrace -ffpe-trap=invalid,zero,overflow,underflow,denormal
else
LINKERFLAGS += -O -ffpe-summary=none
BUILDFLAGS += -O -ffpe-summary=none
LINKERFLAGS += -O
BUILDFLAGS += -O
endif

ifeq ($(wildcard $(EXO_LIB_DIR)),)
Expand Down Expand Up @@ -232,4 +232,4 @@ static: BUILDFLAGS += -static-libgfortran -static-libgcc
static: build

%.o : %.f
$(FC) $(LINKERFLAGS) -c -o $@ $<
$(FC) $(LINKERFLAGS) -c -o $@ $<

0 comments on commit c1ab5de

Please sign in to comment.