Extra lines before and after query are removed. Whitespace at end of line is removed. SQL comments are converted to cpp style comments and are outside the string literal. To achieve this the function now uses the SQLLexer to know what is comment. This also required the additional capability in the lexer to also return whitespace and newline tokens. Also a few bugs in the lexer were fixed.
83 lines
3.8 KiB
Prolog
83 lines
3.8 KiB
Prolog
! include( ../../common.pri ) {
|
|
error( "Couldn't find the common.pri file!" )
|
|
}
|
|
include(gtest_dependency.pri)
|
|
|
|
TEMPLATE = app
|
|
CONFIG += console
|
|
CONFIG -= app_bundle
|
|
CONFIG += thread
|
|
CONFIG += qt
|
|
|
|
QT += core widgets
|
|
|
|
HEADERS +=
|
|
|
|
SOURCES += main.cpp \
|
|
tst_ConvertLangToSqlString.cpp \
|
|
tst_ConvertToMultiLineCString.cpp \
|
|
tst_ExplainJsonParser.cpp \
|
|
tst_expected.cpp \
|
|
tst_SqlLexer.cpp \
|
|
tst_scopeguard.cpp \
|
|
tst_CsvWriter.cpp \
|
|
tst_PasswordManager.cpp \
|
|
tst_ParamJson.cpp \
|
|
tst_CodeBuilder.cpp \
|
|
tst_NameManglingRules.cpp \
|
|
tst_TypeMappings.cpp \
|
|
tst_Range.cpp \
|
|
tst_SqlParser.cpp
|
|
|
|
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:CONFIG(debug, debug|release): LIBS += -lbotand
|
|
else:win32:CONFIG(release, debug|release): LIBS += -lbotan
|
|
|
|
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
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../pgsql/release/ -lpgsql
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../pgsql/debug/ -lpgsql
|
|
else:unix:!macx: LIBS += -L$$OUT_PWD/../../pgsql/ -lpgsql
|
|
|
|
INCLUDEPATH += $$PWD/../../pgsql
|
|
DEPENDPATH += $$PWD/../../pgsql
|
|
|
|
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pgsql/release/libpgsql.a
|
|
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pgsql/debug/libpgsql.a
|
|
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pgsql/release/pgsql.lib
|
|
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pgsql/debug/pgsql.lib
|
|
else:unix:!macx: PRE_TARGETDEPS += $$OUT_PWD/../../pgsql/libpgsql.a
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../pglablib/release/ -lpglablib
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../pglablib/debug/ -lpglablib
|
|
else:unix:!macx: LIBS += -L$$OUT_PWD/../../pglablib/ -lpglablib
|
|
|
|
INCLUDEPATH += $$PWD/../../pglablib
|
|
DEPENDPATH += $$PWD/../../pglablib
|
|
|
|
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pglablib/release/libpglablib.a
|
|
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pglablib/debug/libpglablib.a
|
|
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pglablib/release/pglablib.lib
|
|
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../pglablib/debug/pglablib.lib
|
|
else:unix:!macx: PRE_TARGETDEPS += $$OUT_PWD/../../pglablib/libpglablib.a
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../mygtestutils/release/ -lmygtestutils
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../mygtestutils/debug/ -lmygtestutils
|
|
else:unix:!macx: LIBS += -L$$OUT_PWD/../mygtestutils/ -lmygtestutils
|
|
|
|
INCLUDEPATH += $$PWD/../mygtestutils
|
|
DEPENDPATH += $$PWD/../mygtestutils
|
|
|
|
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../mygtestutils/release/libmygtestutils.a
|
|
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../mygtestutils/debug/libmygtestutils.a
|
|
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../mygtestutils/release/mygtestutils.lib
|
|
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../mygtestutils/debug/mygtestutils.lib
|
|
else:unix:!macx: PRE_TARGETDEPS += $$OUT_PWD/../mygtestutils/libmygtestutils.a
|