summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-25 17:26:37 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-25 17:26:37 +0200
commit8266109953e01663ab828b1fbd77932c975b1ca9 (patch)
tree15229ba4f8a58cdc33b1a99268cc7b4df82ea89e
parentc46113823e5bde62ef5a1ff53ec26d954b3ff53e (diff)
downloadcssh-8266109953e01663ab828b1fbd77932c975b1ca9.tar.gz
cssh-8266109953e01663ab828b1fbd77932c975b1ca9.tar.bz2
Travis fixes
-rw-r--r--dist/travis/before_script.sh6
-rw-r--r--dist/travis/script.sh48
2 files changed, 40 insertions, 14 deletions
diff --git a/dist/travis/before_script.sh b/dist/travis/before_script.sh
index 7538bb5..8a6f397 100644
--- a/dist/travis/before_script.sh
+++ b/dist/travis/before_script.sh
@@ -9,14 +9,20 @@ case $OS in
sudo apt-get update -qq
sudo apt-get install -y \
cmake \
+ gengetopt \
libssh-dev
;;
Darwin)
brew update
+ if test "X$CC" = "Xgcc"; then
+ brew install gcc48 --enable-all-languages || true
+ brew link --force gcc48 || true
+ fi
brew install \
cmake \
libssh \
+ gengetopt \
gettext \
|| true
# make sure cmake finds the brew version of gettext
diff --git a/dist/travis/script.sh b/dist/travis/script.sh
index 55c6890..7d3871b 100644
--- a/dist/travis/script.sh
+++ b/dist/travis/script.sh
@@ -18,20 +18,40 @@ case $OS in
;;
Darwin)
- # forcing brew versions (of gettext) over Mac versions
- export CFLAGS=-I/usr/local
- export CXXFLAGS=-I/usr/local
- export LDFLAGS=-L/usr/local/lib
- mkdir build
- cd build
- cmake \
- -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_CXX_FLAGS=-g -G Xcode \
- ..
- xcodebuild -configuration Release -target ALL_BUILD
- xcodebuild -configuration Release -target RUN_TESTS
- sudo xcodebuild -configuration Release -target install
- cd ..
+ if test "X$CC" = "Xgcc"; then
+ # gcc on OSX is a mere frontend to clang, force using gcc 4.8
+ export CXX=g++-4.8
+ export CC=gcc-4.8
+ # forcing brew versions (of gettext) over Mac versions
+ export CFLAGS=-I/usr/local
+ export CXXFLAGS=-I/usr/local
+ export LDFLAGS=-L/usr/local/lib
+ mkdir build
+ cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_FLAGS=-g -G 'Unix Makefiles' \
+ ..
+ make VERBOSE=1
+ make VERBOSE=1 test
+ sudo make VERBOSE=1 install
+ cd ..
+ else
+ # forcing brew versions (of gettext) over Mac versions
+ export CFLAGS=-I/usr/local
+ export CXXFLAGS=-I/usr/local
+ export LDFLAGS=-L/usr/local/lib
+ mkdir build
+ cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_FLAGS=-g -G Xcode \
+ ..
+ xcodebuild -configuration Release -target ALL_BUILD
+ xcodebuild -configuration Release -target RUN_TESTS
+ sudo xcodebuild -configuration Release -target install
+ cd ..
+ fi
;;
*)