summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorocielliottc <elliottc@objectcomputing.com>2023-01-26 06:29:29 -0600
committerGitHub <noreply@github.com>2023-01-26 06:29:29 -0600
commitb8102149a637b7422ad4a57f4c89eb070cc7ccb3 (patch)
treecf2e374626c73fa0b5646eda1577803751ba4844
parent1488042836751b02437b2af195f13c0debae7044 (diff)
parentb57d396f74d885e51480d2ad26f17ff854be411f (diff)
downloadMPC-b8102149a637b7422ad4a57f4c89eb070cc7ccb3.tar.gz
Merge pull request #171 from ocielliottc/master
Added base projects for various databases.
-rw-r--r--config/mongodb.mpb7
-rw-r--r--config/msgpack.mpb3
-rw-r--r--config/mysql.mpb4
-rw-r--r--config/objectbox.mpb16
-rw-r--r--config/objectivity.mpb30
-rw-r--r--config/odb_mysql.mpb34
6 files changed, 92 insertions, 2 deletions
diff --git a/config/mongodb.mpb b/config/mongodb.mpb
new file mode 100644
index 00000000..104c72a6
--- /dev/null
+++ b/config/mongodb.mpb
@@ -0,0 +1,7 @@
+// -*- MPC -*-
+project: boost_base {
+ includes += $(MONGODB_ROOT)/include/mongocxx/v_noabi \
+ $(MONGODB_ROOT)/include/bsoncxx/v_noabi
+ libpaths += $(MONGODB_ROOT)/lib
+ lit_libs += mongocxx mongoc-1.0 bsoncxx bson-1.0
+}
diff --git a/config/msgpack.mpb b/config/msgpack.mpb
new file mode 100644
index 00000000..d5bd71c8
--- /dev/null
+++ b/config/msgpack.mpb
@@ -0,0 +1,3 @@
+project {
+ includes += $(MSGPACK_ROOT)/include
+}
diff --git a/config/mysql.mpb b/config/mysql.mpb
index b9d90160..da355a73 100644
--- a/config/mysql.mpb
+++ b/config/mysql.mpb
@@ -1,6 +1,6 @@
// -*- MPC -*-
project {
- includes += $(MYSQL_ROOT)/include/mysql
- libpaths += $(MYSQL_ROOT)/lib/mysql
+ includes += $(MYSQL_ROOT)/include $(MYSQL_ROOT)/include/mysql
+ libpaths += $(MYSQL_ROOT)/lib $(MYSQL_ROOT)/lib/mysql
lit_libs += mysqlclient
}
diff --git a/config/objectbox.mpb b/config/objectbox.mpb
new file mode 100644
index 00000000..db42c338
--- /dev/null
+++ b/config/objectbox.mpb
@@ -0,0 +1,16 @@
+// -*- MPC -*-
+project {
+ Define_Custom(objectbox) {
+ command = $(OBJECTBOX_ROOT)/bin/objectbox-generator
+ commandflags = -cpp
+ pch_postrule = 1
+ inputext = .fbs
+ pre_extension = .obx
+ source_outputext = .cpp
+ header_outputext = .hpp
+ }
+
+ includes += $(OBJECTBOX_ROOT)/include
+ libpaths += $(OBJECTBOX_ROOT)/lib
+ lit_libs += objectbox
+}
diff --git a/config/objectivity.mpb b/config/objectivity.mpb
new file mode 100644
index 00000000..99dae80d
--- /dev/null
+++ b/config/objectivity.mpb
@@ -0,0 +1,30 @@
+// -*- MPC -*-
+project {
+ // For some reason, Objectivity names things differently on Windows
+ specific(prop:windows) {
+ lit_libs += oodbi ooco
+ ooddl = ooddlx
+ } else {
+ lit_libs += oo ooco
+ ooddl = ooddl_int
+ }
+
+ Define_Custom(ddl) {
+ command = $(OBJECTIVITY_ROOT)/bin/$(OODDL)
+ commandflags = -I$(OBJECTIVITY_ROOT)/include
+ pch_postrule = 1
+ inputext = .ddl
+ source_pre_extension = _ddl
+ header_pre_extension = , _ref
+ source_outputext = .cpp
+ header_outputext = .h
+ }
+
+ includes += $(OBJECTIVITY_ROOT)/include
+ libpaths += $(OBJECTIVITY_ROOT)/lib
+
+ specific(prop:microsoft) {
+ // Including <objy/query/Query.h> causes this warning
+ DisableSpecificWarnings += 4251
+ }
+}
diff --git a/config/odb_mysql.mpb b/config/odb_mysql.mpb
new file mode 100644
index 00000000..9da902bd
--- /dev/null
+++ b/config/odb_mysql.mpb
@@ -0,0 +1,34 @@
+// -*- MPC -*-
+project: mysql {
+ Define_Custom(odb) {
+ automatic_in = 0
+ output_follows_input = 0
+ command = $(ODB_ROOT)/bin/odb
+ commandflags = -d mysql --generate-query --generate-schema \
+ --odb-file-suffix .odb --sql-file-suffix .odb
+ pch_postrule = 1
+ inputext = .h, .hpp, .hxx, .hh
+ pre_extension = .odb
+ source_outputext = .cxx
+ inline_outputext = .ixx
+ header_outputext = .hxx
+ documentation_outputext = .sql
+ }
+
+ macros += DATABASE_MYSQL LIBODB_MYSQL_INCLUDE_SHORT
+ includes += $(ODB_ROOT)
+ libpaths += $(ODB_ROOT)/lib
+
+ specific(prop:windows) {
+ macros += WIN32_LEAN_AND_MEAN
+ Debug::lit_libs += odb-d odb-mysql-d
+ Release::lit_libs += odb odb-mysql
+ } else {
+ lit_libs += odb odb-mysql
+ }
+
+ specific(prop:microsoft) {
+ // Ignore unrecognized pragma's and non-exported base class
+ DisableSpecificWarnings += 4068 4275
+ }
+}