aboutsummaryrefslogtreecommitdiff
path: root/odb/option-functions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-12 10:01:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-12 10:01:47 +0200
commit35bed9571166e80903ecfd69eb445a1a8df7a974 (patch)
tree4416d83337e844bb2ab6af297aa39fb35343c202 /odb/option-functions.cxx
parentc3c42b69ee9cda9634573497c4476a05c1f3d049 (diff)
Add options to warn about hard additions and deletions
Diffstat (limited to 'odb/option-functions.cxx')
-rw-r--r--odb/option-functions.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/option-functions.cxx b/odb/option-functions.cxx
index 6c693c1..d31bb0b 100644
--- a/odb/option-functions.cxx
+++ b/odb/option-functions.cxx
@@ -20,6 +20,14 @@ process_options (options& o)
if (o.generate_schema_only ())
o.generate_schema (true);
+ // If --warn-hard was specified, then set both --warn-hard-{add,delete}.
+ //
+ if (o.warn_hard ())
+ {
+ o.warn_hard_add (true);
+ o.warn_hard_delete (true);
+ }
+
// Set the default schema format depending on the database.
//
if (o.generate_schema () && o.schema_format ()[db].empty ())