From 17edbe921c42ab3c32efe94bb23a1831eaf53ae6 Mon Sep 17 00:00:00 2001 From: niXman Date: Sat, 30 Nov 2013 04:17:16 +0400 Subject: [PATCH] QtCreator project files added --- .../sqlitecpp-shared/sqlitecpp-shared.pro | 34 +++++++++++++++++++ .../sqlitecpp-static/sqlitecpp-static.pro | 34 +++++++++++++++++++ src/Assertion.h | 10 +++--- 3 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro create mode 100644 qtcreator/sqlitecpp-static/sqlitecpp-static.pro diff --git a/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro b/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro new file mode 100644 index 0000000..ae8d27b --- /dev/null +++ b/qtcreator/sqlitecpp-shared/sqlitecpp-shared.pro @@ -0,0 +1,34 @@ + +TEMPLATE = lib + +CONFIG += console +CONFIG += sharedlib + +CONFIG -= app_bundle +CONFIG -= qt + +DESTDIR = \ + ../../libs + +QMAKE_CFLAGS += \ + -Wno-sign-compare + +INCLUDEPATH +=\ + ../../sqlite3 + +SOURCES += \ + ../../sqlite3/sqlite3.c \ + ../../src/Transaction.cpp \ + ../../src/Statement.cpp \ + ../../src/Database.cpp \ + ../../src/Column.cpp + +HEADERS += \ + ../../sqlite3/sqlite3.h \ + ../../src/Transaction.h \ + ../../src/Statement.h \ + ../../src/SQLiteC++.h \ + ../../src/Exception.h \ + ../../src/Database.h \ + ../../src/Column.h \ + ../../src/Assertion.h diff --git a/qtcreator/sqlitecpp-static/sqlitecpp-static.pro b/qtcreator/sqlitecpp-static/sqlitecpp-static.pro new file mode 100644 index 0000000..3324b5b --- /dev/null +++ b/qtcreator/sqlitecpp-static/sqlitecpp-static.pro @@ -0,0 +1,34 @@ + +TEMPLATE = lib + +CONFIG += console +CONFIG += staticlib + +CONFIG -= app_bundle +CONFIG -= qt + +DESTDIR = \ + ../../libs + +QMAKE_CFLAGS += \ + -Wno-sign-compare + +INCLUDEPATH +=\ + ../../sqlite3 + +SOURCES += \ + ../../sqlite3/sqlite3.c \ + ../../src/Transaction.cpp \ + ../../src/Statement.cpp \ + ../../src/Database.cpp \ + ../../src/Column.cpp + +HEADERS += \ + ../../sqlite3/sqlite3.h \ + ../../src/Transaction.h \ + ../../src/Statement.h \ + ../../src/SQLiteC++.h \ + ../../src/Exception.h \ + ../../src/Database.h \ + ../../src/Column.h \ + ../../src/Assertion.h diff --git a/src/Assertion.h b/src/Assertion.h index a4256cd..6322c1b 100644 --- a/src/Assertion.h +++ b/src/Assertion.h @@ -25,15 +25,15 @@ // if an assert handler is provided by user code, use it instead of assert() namespace SQLite { - // declaration of the assert handler to define in user code - void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg); + // declaration of the assert handler to define in user code + void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg); #ifdef _MSC_VER - #define __func__ __FUNCTION__ + #define __func__ __FUNCTION__ #endif // call the assert handler provided by user code #define SQLITECPP_ASSERT(expression,message) \ - if (!(expression)) SQLite::assertion_failed(__FILE__, __LINE__, __func__, #expression, message) + if (!(expression)) SQLite::assertion_failed(__FILE__, __LINE__, __func__, #expression, message) } #else @@ -45,6 +45,6 @@ namespace SQLite #endif -#ifdef _WIN32 +#if defined(_WIN32) && defined(_MSC_VER) #pragma warning(disable:4290) // Disable warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) #endif