From 9bf40e4a91f6a792c3279d9184b67451cf58bf49 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Dec 2015 18:02:40 +0200 Subject: Add --std option with c++{98,11,14} values; use function-static in C++11 This way we can use option descriptions during static initialization (e.g., of an Apache module). --- cli/options.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'cli/options.cxx') diff --git a/cli/options.cxx b/cli/options.cxx index 95f2a6c..3e7dbcc 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -567,6 +567,8 @@ options () include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -676,6 +678,8 @@ options (int& argc, include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -788,6 +792,8 @@ options (int start, include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -900,6 +906,8 @@ options (int& argc, include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -1014,6 +1022,8 @@ options (int start, include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -1124,6 +1134,8 @@ options (::cli::scanner& s, include_path_specified_ (false), output_dir_ (), output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), generate_modifier_ (), generate_specifier_ (), generate_parse_ (), @@ -1240,6 +1252,9 @@ print_usage (::std::ostream& os, ::cli::usage_para p) os << "--output-dir|-o Write the generated files to instead of the" << ::std::endl << " current directory." << ::std::endl; + os << "--std Specify the C++ standard that should be used" << ::std::endl + << " during compilation." << ::std::endl; + os << "--generate-modifier Generate option value modifiers in addition to" << ::std::endl << " accessors." << ::std::endl; @@ -1436,6 +1451,9 @@ struct _cli_options_map_init _cli_options_map_["-o"] = &::cli::thunk< options, std::string, &options::output_dir_, &options::output_dir_specified_ >; + _cli_options_map_["--std"] = + &::cli::thunk< options, cxx_version, &options::std_, + &options::std_specified_ >; _cli_options_map_["--generate-modifier"] = &::cli::thunk< options, bool, &options::generate_modifier_ >; _cli_options_map_["--generate-specifier"] = -- cgit v1.1