Procházet zdrojové kódy

SConstruc can parse my options

tanghai před 15 roky
rodič
revize
32b9ffdf5e
1 změnil soubory, kde provedl 16 přidání a 1 odebrání
  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)
+