g3log/scripts/buildAndRunTests.sh

42 lines
859 B
Bash
Raw Normal View History

#!/bin/bash
set -ev
unzip -o 3rdParty/gtest/gtest-1.7.0.zip -d 3rdParty/gtest
2014-10-12 07:00:18 +02:00
if [ "$CXX" = "g++" ]; then export CXX=g++-4.8; fi
if [ "$CXX" = "clang++" ]; then export CXX=clang++-3.4; fi
2014-10-12 05:36:39 +02:00
echo $TRAVIS_OS_NAME
2014-10-12 06:49:25 +02:00
echo $CXX
2014-10-12 07:00:18 +02:00
mkdir -p build_travis
2014-10-12 07:00:18 +02:00
cd build_travis
if [[ $CXX == *"g++"* ]]
2014-10-12 05:57:07 +02:00
then
echo "Testing with g++"
2015-07-20 07:16:29 +02:00
cmake -DUSE_DYNAMIC_LOGGING_LEVELS=ON -DADD_G3LOG_UNIT_TEST=ON ..
make -j
2014-10-12 05:36:39 +02:00
./test_concept_sink
./test_configuration
./test_dynamic_loaded_shared_lib
./test_filechange
./test_io
./test_sink
fi
2014-10-12 06:49:25 +02:00
if [ "$CXX" = "clang++-3.4" ]
2014-10-12 05:57:07 +02:00
then
2014-10-12 05:36:39 +02:00
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