Add --warn argument to configure.py

This commit is contained in:
LagoLunatic
2025-06-01 15:16:04 -06:00
committed by Luke Street
parent 4b9499ae71
commit 19dd6f8a3b
+15
View File
@@ -113,6 +113,13 @@ parser.add_argument(
action="store_true",
help="builds equivalent (but non-matching) or modded objects",
)
parser.add_argument(
"--warn",
dest="warn",
type=str,
choices=["all", "off", "error"],
help="how to handle warnings",
)
parser.add_argument(
"--no-progress",
dest="progress",
@@ -209,6 +216,14 @@ if args.debug:
else:
cflags_base.append("-DNDEBUG=1")
# Warning flags
if args.warn == "all":
cflags_base.append("-W all")
elif args.warn == "off":
cflags_base.append("-W off")
elif args.warn == "error":
cflags_base.append("-W error")
# Metrowerks library flags
cflags_runtime = [
*cflags_base,