summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-04-02 18:57:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-04-02 18:57:23 +0200
commit2e4e7ef49e14de043940b1fd08810705918eb243 (patch)
treeb54878f071b58c7cf9e7fc90e14b43b1eac31f10
parent15e6fd2b0976f82eb1ef10d2d26912d12e4f0a99 (diff)
Add ODB_COMPILER and PRAGMA_ODB
-rw-r--r--libodb/odb/core.hxx7
-rw-r--r--odb/odb.cxx2
2 files changed, 8 insertions, 1 deletions
diff --git a/libodb/odb/core.hxx b/libodb/odb/core.hxx
index a88012c..8867ec1 100644
--- a/libodb/odb/core.hxx
+++ b/libodb/odb/core.hxx
@@ -6,6 +6,13 @@
#ifndef ODB_CORE_HXX
#define ODB_CORE_HXX
+#ifdef ODB_COMPILER
+# define PRAGMA_ODB_IMPL(x) _Pragma (#x)
+# define PRAGMA_ODB(x) PRAGMA_ODB_IMPL (odb x)
+#else
+# define PRAGMA_ODB(x)
+#endif
+
namespace odb
{
class image
diff --git a/odb/odb.cxx b/odb/odb.cxx
index 1f8d516..3ee2eb5 100644
--- a/odb/odb.cxx
+++ b/odb/odb.cxx
@@ -52,7 +52,7 @@ main (int argc, char* argv[])
args.push_back ("-x");
args.push_back ("c++");
args.push_back ("-S");
- args.push_back ("-DODB_PLUGIN");
+ args.push_back ("-DODB_COMPILER");
args.push_back ("-fplugin=" + plugin);
for (int i = 1; i < argc; ++i)