Revision ce7a4eda
Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt
.travis.yml | ||
---|---|---|
language: cpp
|
||
|
||
os:
|
||
- linux
|
||
# - osx
|
||
|
||
env:
|
||
|
||
|
||
install:
|
||
- lsb_release -a
|
||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
|
||
&& sudo apt-add-repository -y ppa:beineri/opt-qt541
|
||
&& sudo apt-get -qq update
|
||
&& sudo apt-get -qq install g++-4.8 libc6-i386 qt54tools qt54svg qt54webkit qt54script
|
||
&& export CXX="g++-4.8"
|
||
&& export CC="gcc-4.8"
|
||
;
|
||
else
|
||
brew update
|
||
&& brew install qt5
|
||
&& brew install qt5-qmake
|
||
&& chmod -R 755 /usr/local/opt/qt5/*
|
||
;
|
||
fi
|
||
|
||
script:
|
||
- /opt/qt54/bin/qt54-env.sh
|
||
- echo "#define BUILD ""$TRAVIS_BUILD_NUMBER" > build_number.h
|
||
- /opt/qt54/bin/qmake -project
|
||
- /opt/qt54/bin/qmake EntityManager.pro -r "CONFIG+=release"
|
||
- make
|
||
- make check
|
EntityManager.pro | ||
---|---|---|
src/schema/mysqlquerybuilder.cpp \
|
||
src/entityinspector.cpp
|
||
|
||
|
||
LIBS += -lsqlite3
|
||
CONFIG += c++11
|
||
QMAKE_CXXFLAGS += -std=c++11 -Wall
|
||
|
||
CONFIG += c++14
|
||
|
||
unix {
|
||
linux-g++ {
|
||
system( g++ --version | grep -e "\<5.[0-9]" ) {
|
||
CONFIG += c++14
|
||
QMAKE_CXXFLAGS += -std=c++14
|
||
QMAKE_CXXFLAGS += -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override
|
||
}
|
||
}
|
||
target.path = /usr/lib
|
||
INSTALLS += target
|
||
QMAKE_CXXFLAGS += -Wall -Wextra -Wmaybe-uninitialized -Wunsafe-loop-optimizations -pedantic -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -O
|
||
QMAKE_CXXFLAGS += -Wall -Wextra -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override -Wmaybe-uninitialized -Wunsafe-loop-optimizations -pedantic -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -O
|
||
}
|
||
|
||
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
|
src/logger.cpp | ||
---|---|---|
#include <QDebug>
|
||
#include <QTextStream>
|
||
#include <QDateTime>
|
||
#include <QtGlobal>
|
||
|
||
using namespace CuteEntityManager;
|
||
|
||
... | ... | |
case MsgType::DEBUG:
|
||
qDebug() << msg;
|
||
break;
|
||
#if QT_VERSION >= 0x050500
|
||
case MsgType::INFO:
|
||
qInfo() << msg;
|
||
break;
|
||
case MsgType::WARNING:
|
||
qWarning() << msg;
|
||
break;
|
||
#else
|
||
case MsgType::INFO:
|
||
qDebug() << msg;
|
||
break;
|
||
case MsgType::WARNING:
|
||
qDebug() << msg;
|
||
break;
|
||
#endif
|
||
case MsgType::CRITICAL:
|
||
qCritical() << msg;
|
||
break;
|
Auch abrufbar als: Unified diff
...