diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-11 11:19:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-11 11:19:04 +0200 |
commit | b42d9a345e2b02a1b17fa61b22117fbf7b187a31 (patch) | |
tree | 9c8ea0116ae35cf8df86e958495fc46563d095dd /cli/options.cxx | |
parent | 8062e4e9a4998cfa44002afd2435ff9083e092e8 (diff) |
Add support for -I option
Now quote-included ("") option files are searched for relative to the
including file while bracket-included (<>) ones are search in the
directories specified with -I.
Diffstat (limited to 'cli/options.cxx')
-rw-r--r-- | cli/options.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/options.cxx b/cli/options.cxx index 2d45b05..a720a2a 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -551,6 +551,7 @@ options:: options () : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -595,6 +596,7 @@ options (int& argc, ::cli::unknown_mode arg) : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -642,6 +644,7 @@ options (int start, ::cli::unknown_mode arg) : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -689,6 +692,7 @@ options (int& argc, ::cli::unknown_mode arg) : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -738,6 +742,7 @@ options (int start, ::cli::unknown_mode arg) : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -783,6 +788,7 @@ options (::cli::scanner& s, ::cli::unknown_mode arg) : help_ (), version_ (), + include_path_ (), output_dir_ (), generate_modifier_ (), generate_specifier_ (), @@ -827,6 +833,9 @@ print_usage (::std::ostream& os) os << "--version Print version and exit." << ::std::endl; + os << "--include-path|-I <dir> Search <dir> for bracket-included ('<>') option" << ::std::endl + << " files." << ::std::endl; + os << "--output-dir|-o <dir> Write the generated files to <dir> instead of the" << ::std::endl << " current directory." << ::std::endl; @@ -937,6 +946,10 @@ struct _cli_options_map_init &::cli::thunk< options, bool, &options::help_ >; _cli_options_map_["--version"] = &::cli::thunk< options, bool, &options::version_ >; + _cli_options_map_["--include-path"] = + &::cli::thunk< options, std::vector<std::string>, &options::include_path_ >; + _cli_options_map_["-I"] = + &::cli::thunk< options, std::vector<std::string>, &options::include_path_ >; _cli_options_map_["--output-dir"] = &::cli::thunk< options, std::string, &options::output_dir_ >; _cli_options_map_["-o"] = |