mirror of
https://github.com/Relintai/scons_gd.git
synced 2025-04-19 21:53:13 +02:00
22 lines
563 B
Plaintext
22 lines
563 B
Plaintext
import sys
|
|
from SCons.Script.SConsOptions import SConsOptionParser, SConsBadOptionError
|
|
|
|
AddOption(
|
|
'--testing',
|
|
help='Test arg',
|
|
)
|
|
|
|
if ARGUMENTS.get('raise', 0) == '1':
|
|
ValidateOptions(throw_exception=True)
|
|
elif ARGUMENTS.get('raise', 0) == '2':
|
|
try:
|
|
ValidateOptions(throw_exception=True)
|
|
except SConsBadOptionError as e:
|
|
print("Parser is SConsOptionParser:%s" % (isinstance(e.parser, SConsOptionParser)))
|
|
print("Message is :%s" % e.opt_str)
|
|
Exit(3)
|
|
else:
|
|
ValidateOptions()
|
|
|
|
print("This is in SConstruct")
|