Explorar o código

SConstruc can parse my options

tanghai %!s(int64=15) %!d(string=hai) anos
pai
achega
32b9ffdf5e
Modificáronse 1 ficheiros con 16 adicións e 1 borrados
  1. 16 1
      SConstruct

+ 16 - 1
SConstruct

@@ -1,3 +1,18 @@
 env = DefaultEnvironment()
 
-Export('env')
+def ParseOptions():
+	AddOption('--mode',
+		dest='mode',
+		type='string',
+		nargs=1,
+		action='store',
+		default='dbg',
+		help='build in dbg or opt mode')
+	env['mode'] = GetOption('mode')
+
+ParseOptions()
+
+Export('env')
+
+SConscript('src/SConscript' % x, build_dir=target_dir)
+