diff options
author | louiz’ <louiz@louiz.org> | 2017-12-01 14:59:22 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-12-02 20:08:50 +0100 |
commit | 414bbca0bc2bf20c4f424c2368997a46129b32cc (patch) | |
tree | c9e67c8eedee84963ecc920d8158738770f9238e /src/database/sqlite3_engine.cpp | |
parent | 923cf31ba62ebfd2369a9594a60020477730b649 (diff) | |
download | biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.gz biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.bz2 biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.xz biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.zip |
Handle postgresql and sqlite3 libs properly
Do not fail to compile when one of them is missing but the other one is not.
Raise an error when trying to open a database with the missing library.
see #3237
Diffstat (limited to 'src/database/sqlite3_engine.cpp')
-rw-r--r-- | src/database/sqlite3_engine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/database/sqlite3_engine.cpp b/src/database/sqlite3_engine.cpp index 7e34f89..a94a892 100644 --- a/src/database/sqlite3_engine.cpp +++ b/src/database/sqlite3_engine.cpp @@ -1,3 +1,7 @@ +#include <biboumi.h> + +#ifdef SQLITE3_FOUND + #include <database/sqlite3_engine.hpp> #include <database/sqlite3_statement.hpp> @@ -91,3 +95,5 @@ std::string Sqlite3Engine::id_column_type() { return "INTEGER PRIMARY KEY AUTOINCREMENT"; } + +#endif |