Moved some parts to a static lib so both the executable and the tests can link to it.

Written additional tests.
This commit is contained in:
eelke 2017-02-26 19:29:50 +01:00
parent 0a809a7288
commit d0ea9dfa0c
39 changed files with 1767 additions and 493 deletions

View file

@ -4,6 +4,7 @@
#
#-------------------------------------------------
CONFIG += c++11
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql
@ -11,9 +12,17 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql
TARGET = pglab
TEMPLATE = app
INCLUDEPATH += C:\prog\include
INCLUDEPATH += C:\prog\include C:\VSproj\boost_1_63_0
DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX
LIBS += c:\prog\lib\libpq.lib c:\prog\lib\fmt.lib User32.lib ws2_32.lib
LIBS += /LIBPATH:C:\VSproj\boost_1_63_0\stage\lib /LIBPATH:c:\prog\lib\ libpq.lib fmt.lib User32.lib ws2_32.lib
debug {
LIBS += c:\prog\lib\botand_imp.lib
}
release {
# LIBS += c:\prog\lib\botan.lib
}
win32:RC_ICONS += pglab.ico
@ -29,7 +38,6 @@ SOURCES += main.cpp\
tsqueue.cpp \
win32event.cpp \
waithandlelist.cpp \
CsvWriter.cpp \
DatabaseWindow.cpp \
ConnectionManagerWindow.cpp \
ConnectionListModel.cpp \
@ -53,7 +61,6 @@ SOURCES += main.cpp\
ParamListModel.cpp \
MainWindow.cpp \
SqlSyntaxHighlighter.cpp \
SqlLexer.cpp \
ServerWindow.cpp \
ASyncWindow.cpp \
DatabasesTableModel.cpp \
@ -65,7 +72,8 @@ SOURCES += main.cpp\
PgAuthIdContainer.cpp \
Pgsql_Result.cpp \
Pgsql_Row.cpp \
Pgsql_Value.cpp
Pgsql_Value.cpp \
ConnectionList.cpp
HEADERS += \
sqlparser.h \
@ -78,13 +86,10 @@ HEADERS += \
tsqueue.h \
win32event.h \
waithandlelist.h \
CsvWriter.h \
DatabaseWindow.h \
ConnectionManagerWindow.h \
ConnectionListModel.h \
ConnectionConfig.h \
ScopeGuard.h \
Expected.h \
QueryTab.h \
stopwatch.h \
util.h \
@ -117,7 +122,8 @@ HEADERS += \
PgAuthIdContainer.h \
Pgsql_Result.h \
Pgsql_Row.h \
Pgsql_Value.h
Pgsql_Value.h \
ConnectionList.h
FORMS += mainwindow.ui \
DatabaseWindow.ui \
@ -132,3 +138,14 @@ RESOURCES += \
resources.qrc
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../core/release/ -lcore
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../core/debug/ -lcore
INCLUDEPATH += $$PWD/../core
DEPENDPATH += $$PWD/../core
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/release/libcore.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/debug/libcore.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/release/core.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/debug/core.lib