diff options
Diffstat (limited to 'src/tools.cc')
| -rw-r--r-- | src/tools.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools.cc b/src/tools.cc index 9dcaec6..f8662cc 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -51,6 +51,7 @@ std::ostream& operator<<(std::ostream& stream, const ctor::cxx_opt& opt) case ctor::cxx_opt::warn_shadow: stream << "ctor::cxx_opt::warn_shadow"; break; case ctor::cxx_opt::warn_extra: stream << "ctor::cxx_opt::warn_extra"; break; case ctor::cxx_opt::warnings_as_errors: stream << "ctor::cxx_opt::warnings_as_errors"; break; + case ctor::cxx_opt::exceptions: stream << "ctor::cxx_opt::exceptions"; break; case ctor::cxx_opt::generate_dep_tree: stream << "ctor::cxx_opt::generate_dep_tree"; break; case ctor::cxx_opt::no_link: stream << "ctor::cxx_opt::no_link"; break; case ctor::cxx_opt::include_path: stream << "ctor::cxx_opt::include_path"; break; @@ -357,6 +358,11 @@ ctor::cxx_flag cxx_option(std::string_view flag) return { ctor::cxx_opt::warn_extra}; } + if(flag.starts_with("-fexceptions")) + { + return { ctor::cxx_opt::exceptions}; + } + if(flag.starts_with("-g")) { return { ctor::cxx_opt::debug }; @@ -420,6 +426,8 @@ std::vector<std::string> cxx_option(ctor::cxx_opt opt, std::string_view arg, return {"-Wextra"}; case ctor::cxx_opt::warnings_as_errors: return {"-Werror"}; + case ctor::cxx_opt::exceptions: + return {"-fexceptions"}; case ctor::cxx_opt::generate_dep_tree: return {"-MMD"}; case ctor::cxx_opt::no_link: |
