From b42d9a345e2b02a1b17fa61b22117fbf7b187a31 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 May 2012 11:19:04 +0200 Subject: 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. --- cli/options.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli/options.cxx') 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 Search for bracket-included ('<>') option" << ::std::endl + << " files." << ::std::endl; + os << "--output-dir|-o Write the generated files to 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, &options::include_path_ >; + _cli_options_map_["-I"] = + &::cli::thunk< options, std::vector, &options::include_path_ >; _cli_options_map_["--output-dir"] = &::cli::thunk< options, std::string, &options::output_dir_ >; _cli_options_map_["-o"] = -- cgit v1.1