Implement the --fatal-errors command line option
[cython.git] / Cython / Compiler / CmdLine.py
index 320690b0f2c00dc3932e63175fd53ce7ba3fd55a..0b0c8244bedc529729f00b9360951bd00fc7c6a1 100644 (file)
@@ -35,6 +35,7 @@ Options:
   --embed                        Embed the Python interpreter in a main() method.
   -2                             Compile based on Python-2 syntax and code semantics.
   -3                             Compile based on Python-3 syntax and code semantics.
+  --fatal-errors                 Abort the compilation on the first error
   -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
 """
 
@@ -117,6 +118,8 @@ def parse_command_line(args):
                 options.language_level = 2
             elif option == '-3':
                 options.language_level = 3
+            elif option == "--fatal-errors":
+                Options.fatal_errors = True
             elif option in ("-X", "--directive"):
                 try:
                     options.compiler_directives = Options.parse_directive_list(