From 8aebe008eba3152b37858822df4fdb4f0b51e0b9 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Mon, 1 Aug 2011 20:50:22 +0200 Subject: leex: honour -Werror passed from erlc --- lib/parsetools/src/leex.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/parsetools/src') diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl index 942e9928b1..e3e10eb204 100644 --- a/lib/parsetools/src/leex.erl +++ b/lib/parsetools/src/leex.erl @@ -73,12 +73,15 @@ %%% Interface to erl_compile. compile(Input0, Output0, - #options{warning = WarnLevel, verbose=Verbose, includes=Includes}) -> + #options{warning = WarnLevel, verbose=Verbose, includes=Includes, + specific=Specific}) -> Input = assure_extension(shorten_filename(Input0), ".xrl"), Output = assure_extension(shorten_filename(Output0), ".erl"), Includefile = lists:sublist(Includes, 1), + Werr = proplists:get_bool(warnings_as_errors, Specific), Opts = [{scannerfile,Output},{includefile,Includefile},{verbose,Verbose}, - {report_errors,true},{report_warnings,WarnLevel > 0}], + {report_errors,true},{report_warnings,WarnLevel > 0}, + {warnings_as_errors, Werr}], case file(Input, Opts) of {ok, _} -> ok; -- cgit v1.2.3