From 2e4e7ef49e14de043940b1fd08810705918eb243 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 2 Apr 2010 18:57:23 +0200 Subject: Add ODB_COMPILER and PRAGMA_ODB --- libodb/odb/core.hxx | 7 +++++++ odb/odb.cxx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- cgit v1.1