g++ and clang but only on Linux

This commit is contained in:
KjellKod 2014-10-11 21:36:39 -06:00
parent 7c5ce707e2
commit 21edd3fc05
2 changed files with 31 additions and 24 deletions

View File

@ -2,13 +2,19 @@ language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
before_install:
if [ ${TRAVIS_OS_NAME} = 'linux' ];
then
sudo add-apt-repository -y ppa:h-rayflood/llvm;
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update -qq;
fi
script: "
echo ${TRAVIS_OS_NAME};
echo ${TRAVIS_OS_NAME};
@ -16,7 +22,6 @@ script: "
then
sudo apt-get -qq update;
sudo apt-get install python-software-properties;
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install gcc-4.8 g++-4.8;
sudo apt-get install cmake;

View File

@ -5,26 +5,28 @@ set -ev
unzip -o 3rdParty/gtest/gtest-1.7.0.zip -d 3rdParty/gtest
mkdir build_travis
cd build_travis
cmake -DCMAKE_CXX_COMPILER=g++ -DUSE_G3LOG_UNIT_TEST=ON ..
make -j
echo "Testing with g++"
./test_concept_sink
./test_configuration
./test_dynamic_loaded_shared_lib
./test_filechange
./test_io
./test_sink
echo $TRAVIS_OS_NAME
if [ "$CXX" = "g++" ]; then
cmake -DCMAKE_CXX_COMPILER=g++ -DUSE_G3LOG_UNIT_TEST=ON ..
make -j
echo "Testing with g++"
./test_concept_sink
./test_configuration
./test_dynamic_loaded_shared_lib
./test_filechange
./test_io
./test_sink
fi
echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo "Testing with Clang++"
make clean
rm -rf *Make* *make* *.so *3log*
cmake -DCMAKE_CXX_COMPILER=clang++ -DUSE_G3LOG_UNIT_TEST=ON ..
make -j
./test_concept_sink
./test_configuration
#./test_dynamic_loaded_shared_lib
./test_filechange
./test_io
./test_sink
if [ "$CXX" = "clang++" ]; then
echo "Testing with Clang++"
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-std=gnu++11 -DUSE_G3LOG_UNIT_TEST=ON ..
make -j
./test_concept_sink
./test_configuration
#./test_dynamic_loaded_shared_lib
./test_filechange
./test_io
./test_sink
fi