summaryrefslogtreecommitdiff
path: root/xsd/xsd/xsd.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-09-11 10:37:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-09-11 10:37:45 +0200
commit7d26ea59564e573b9f8a1f025f7fd5df24ee2e80 (patch)
treef136ed0e00e74c8e1d1836ff7c28b3159ecf8f35 /xsd/xsd/xsd.cxx
parent34df5f02ffa3e0f0077a7a4b18eaf41dbc5184f9 (diff)
Add --file-list-only option
This option allows only writing the list of C++ files that would be generated without actually generating them.
Diffstat (limited to 'xsd/xsd/xsd.cxx')
-rw-r--r--xsd/xsd/xsd.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/xsd/xsd/xsd.cxx b/xsd/xsd/xsd.cxx
index 5a239d5..d2b0faf 100644
--- a/xsd/xsd/xsd.cxx
+++ b/xsd/xsd/xsd.cxx
@@ -298,6 +298,14 @@ main (int argc, char* argv[])
? static_cast<CXX::options&> (*tree_ops)
: static_cast<CXX::options&> (*parser_ops));
+ // Validate options.
+ //
+ if (common_ops.file_list_only () && !common_ops.file_list_specified ())
+ {
+ e << "error: --file-list-only specified without --file-list" << endl;
+ return 1;
+ }
+
// Disabled warnings.
//
WarningSet disabled_w;