Преглед изворни кода

SConstruc can parse my options

tanghai пре 15 година
родитељ
комит
32b9ffdf5e
1 измењених фајлова са 16 додато и 1 уклоњено
  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)
+