diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 10:33:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 11:25:15 +0200 |
commit | 8c31ee59d95356cb111bab1853eac3b35b451f01 (patch) | |
tree | 00d62089c7ea3e39f7e9d4968517a51562483036 /odb/generator.cxx | |
parent | 0efbd383bf4b9d6c1a884ff0249412567b329fce (diff) |
Diffstat (limited to 'odb/generator.cxx')
-rw-r--r-- | odb/generator.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx index 4af66c4..ed37964 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -321,19 +321,21 @@ generate (options const& ops, for (paths::const_iterator i (inputs.begin ()); i != inputs.end (); ++i) hxx << "#include " << ctx->process_include_path (i->leaf ().string ()) << endl; + hxx << endl; + // There are no -odb.hxx includes if we are generating code for + // everything. + // + if (!ops.at_once ()) + if (include::generate (true)) + hxx << endl; + { // We don't want to indent prologues/epilogues. // ind_filter ind (ctx->os); - // There are no -odb.hxx includes if we are generating code for - // everything. - // - if (!ops.at_once ()) - include::generate (true); - switch (db) { case database::common: @@ -526,6 +528,12 @@ generate (options const& ops, cxx << "#include " << ctx->process_include_path (hxx_name) << endl; + // There are no -odb.hxx includes if we are generating code for + // everything. + // + if (!ops.at_once ()) + include::generate (false); + if (!impl_guard.empty ()) cxx << "#undef " << impl_guard << endl; @@ -536,12 +544,6 @@ generate (options const& ops, // ind_filter ind (ctx->os); - // There are no -odb.hxx includes if we are generating code for - // everything. - // - if (!ops.at_once ()) - include::generate (false); - switch (db) { case database::common: |