aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-04-09 10:04:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-10 18:46:45 +0200
commit458779f49a789e403cf108ac04b6fa035cb06810 (patch)
tree6105792df940066ac6cc4b782e505a2a0fbe2aaa
parent5ebd62ec778bc8c9540e2379e764ac52c060adfc (diff)
Enable --generate-schema-only option for separate schema format
-rw-r--r--NEWS5
-rw-r--r--odb/generator.cxx1
-rw-r--r--odb/validator.cxx5
3 files changed, 7 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 899267c..ccd7a42 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,11 @@ Version 2.3.0
* The generated database schemas now explicitly specify NULL for nullable
columns.
+ * The generated separate C++ schema file (--schema-format separate) no
+ longer includes the generated header file (-odb.hxx). As a result, it is
+ now possible to use the --generate-schema-only and --at-once options to
+ generate a combined C++ schema file for several headers.
+
Version 2.2.0
* Multi-database support. This mechanism allows an application to
diff --git a/odb/generator.cxx b/odb/generator.cxx
index 8f49368..1a81780 100644
--- a/odb/generator.cxx
+++ b/odb/generator.cxx
@@ -370,7 +370,6 @@ generate (options const& ops,
//
//
bool gen_sep_schema (
- gen_cxx &&
gen_schema &&
ops.schema_format ()[db].count (schema_format::separate));
diff --git a/odb/validator.cxx b/odb/validator.cxx
index c6b9c86..f33962b 100644
--- a/odb/validator.cxx
+++ b/odb/validator.cxx
@@ -967,11 +967,10 @@ validate (options const& ops,
// Validate options.
//
if (ops.generate_schema_only () &&
- (ops.schema_format ()[db].size () != 1 ||
- *ops.schema_format ()[db].begin () != schema_format::sql))
+ ops.schema_format ()[db].count (schema_format::embedded))
{
cerr << "error: --generate-schema-only is only valid when generating " <<
- "schema as a standalone SQL file" << endl;
+ "schema as a standalone SQL or separate C++ file" << endl;
valid = false;
}