aboutsummaryrefslogtreecommitdiff
path: root/odb/odb.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-04 09:27:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-04 09:27:20 +0200
commitaf8160be3fa83253cea2cb93e5c171c2c5d61a5d (patch)
treeb468611fec6482af32f1b5df182513e9159f7575 /odb/odb.cxx
parentae4485ca4f926a0d7f2fc91e9e17a18fc0e83097 (diff)
Check runtime/compiler version compatibility during ODB compilation
Diffstat (limited to 'odb/odb.cxx')
-rw-r--r--odb/odb.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/odb/odb.cxx b/odb/odb.cxx
index d4d719d..196329b 100644
--- a/odb/odb.cxx
+++ b/odb/odb.cxx
@@ -536,7 +536,16 @@ main (int argc, char* argv[])
// Add the standard prologue.
//
- // os << "#line 1 \"<standard-odb-prologue>\"" << endl;
+ os << "#line 1 \"<standard-odb-prologue>\"" << endl;
+
+ // Make sure ODB compiler and libodb versions are compatible.
+ //
+ os << "#include <odb/version.hxx>" << endl
+ << endl
+ << "#if ODB_VERSION != " << ODB_VERSION << endl
+ << "# error incompatible ODB compiler and runtime versions" << endl
+ << "#endif" << endl
+ << endl;
// Add custom prologue if any.
//