www.digitalmars.com         C & C++   DMDScript  

D.gnu - Disable -Werror when using dub?

reply Brian <bcallah openbsd.org> writes:
Hello --

I may have missed this in the documentation but is it possible to 
turn off -Werror when building with dub+gdc? I want to do some 
debugging and short-circuit some functions with an assert(0) but 
that will flag -Werror on statements being unreachable, which 
coincidentally is exactly what I want.

Thanks!

~Brian
Apr 06 2021
parent reply Dennis <dkorpel gmail.com> writes:
On Tuesday, 6 April 2021 at 21:30:04 UTC, Brian wrote:
 I may have missed this in the documentation but is it possible 
 to turn off -Werror when building with dub+gdc?
You can add `buildOptions "allowWarnings"` to your dub.sdl, or the equivalent to your dub.json. See https://dub.pm/package-format-sdl.html
Apr 06 2021
parent reply Dennis <dkorpel gmail.com> writes:
On Wednesday, 7 April 2021 at 00:17:35 UTC, Dennis wrote:
 You can add `buildOptions "allowWarnings"` to your dub.sdl, or 
 the equivalent to your dub.json. See 
 https://dub.pm/package-format-sdl.html
Should be `buildRequirements`
Apr 06 2021
parent Brian <bcallah openbsd.org> writes:
On Wednesday, 7 April 2021 at 00:18:42 UTC, Dennis wrote:
 On Wednesday, 7 April 2021 at 00:17:35 UTC, Dennis wrote:
 You can add `buildOptions "allowWarnings"` to your dub.sdl, or 
 the equivalent to your dub.json. See 
 https://dub.pm/package-format-sdl.html
Should be `buildRequirements`
Thanks. I did in fact miss it. It's there in the docs.
Apr 06 2021