def DebugFormatFlag(name, desc=None):
DebugFlag(name, desc, True)
+# Create a compound debug flag that encapsulates all flags: "All". This
+# flag should not be used within C++ code - it is a compound meta flag
+def _createAllDebugFlag():
+ simple_flags = []
+ for name,flag in sorted(debug_flags.items()):
+ n, compound, desc, fmt = flag
+ assert n == name
+ if not compound and not fmt:
+ simple_flags.append(n)
+
+ CompoundFlag("All", simple_flags,
+ "Controls all debug flags. It should not be used within C++ code.")
+
Export('DebugFlag')
Export('CompoundFlag')
Export('DebugFormatFlag')
code.write(str(target[0]))
+# Generate the files for the debug and debug-format flags
+_createAllDebugFlag()
for name,flag in sorted(debug_flags.items()):
n, compound, desc, fmt = flag
assert n == name
for name, flag in filter(lambda kv: isinstance(kv[1], CompoundFlag),
sorted_flags):
print(" %s: %s" % (name, flag.desc))
- printList([ c.name for c in flag.kids() ], indent=8)
+ # The list of kids for flag "All" is too long, so it is not printed
+ if name != "All":
+ printList([ c.name for c in flag.kids() ], indent=8)
+ else:
+ print(" All Base Flags")
print()
print("Formatting Flags:")
for name, flag in filter(lambda kv: isinstance(kv[1], SimpleFlag)