mirror of
https://github.com/encounter/dtk-template.git
synced 2026-07-10 03:18:35 -07:00
Add --warn argument to configure.py
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user