summaryrefslogtreecommitdiff
path: root/src/database/postgresql_engine.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-12-01 14:59:22 +0100
committerlouiz’ <louiz@louiz.org>2017-12-02 20:08:50 +0100
commit414bbca0bc2bf20c4f424c2368997a46129b32cc (patch)
treec9e67c8eedee84963ecc920d8158738770f9238e /src/database/postgresql_engine.cpp
parent923cf31ba62ebfd2369a9594a60020477730b649 (diff)
downloadbiboumi-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/postgresql_engine.cpp')
-rw-r--r--src/database/postgresql_engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/database/postgresql_engine.cpp b/src/database/postgresql_engine.cpp
index 9f603ab..1c01ed5 100644
--- a/src/database/postgresql_engine.cpp
+++ b/src/database/postgresql_engine.cpp
@@ -1,3 +1,6 @@
+#include <biboumi.h>
+#ifdef PQ_FOUND
+
#include <database/postgresql_engine.hpp>
#include <database/postgresql_statement.hpp>
@@ -75,3 +78,5 @@ std::string PostgresqlEngine::id_column_type()
{
return "SERIAL";
}
+
+#endif