SConstruct
branchpyrit
changeset 94 4c8abb8977dc
parent 93 96d65f841791
child 95 ca7d4c665531
equal deleted inserted replaced
93:96d65f841791 94:4c8abb8977dc
    52 	BoolOption('force_flags', "use only flags specified by 'flags' option (do not autodetect arch/sse flags)", False),
    52 	BoolOption('force_flags', "use only flags specified by 'flags' option (do not autodetect arch/sse flags)", False),
    53 	BoolOption('profile', "enable gcc's profiling support (-pg)", False),
    53 	BoolOption('profile', "enable gcc's profiling support (-pg)", False),
    54 )
    54 )
    55 if env['PLATFORM'] == 'win32':
    55 if env['PLATFORM'] == 'win32':
    56 	opt.AddOptions(
    56 	opt.AddOptions(
    57 		BoolOption('msvc', 'use Microsoft Visual C++ Compiler, if available', True),
    57 		BoolOption('mingw', 'use Mingw and GCC compiler, if available', False),
    58 		('pythonpath', 'path to Python installation',
    58 		('pythonpath', 'path to Python installation',
    59 			'C:\\Python%c%c' % (sys.version[0], sys.version[2])),
    59 			'C:\\Python%c%c' % (sys.version[0], sys.version[2])),
    60 	)
    60 	)
    61 else:
    61 else:
    62 	opt.AddOptions(
    62 	opt.AddOptions(
    63 		BoolOption('intelc', 'use Intel C++ Compiler, if available', True),
    63 		BoolOption('intelc', 'use Intel C++ Compiler, if available', False),
    64 	)
    64 	)
    65 
    65 
    66 
    66 
    67 opt.Update(env)
    67 opt.Update(env)
    68 opt.Save('build/.optioncache', env)
    68 opt.Save('build/.optioncache', env)
   153 	conf.CheckCPUFlags()
   153 	conf.CheckCPUFlags()
   154 
   154 
   155 if intelc and (not gcc or conf.env['intelc']):
   155 if intelc and (not gcc or conf.env['intelc']):
   156 	Tool('intelc').generate(conf.env)
   156 	Tool('intelc').generate(conf.env)
   157 	cc = 'intelc'
   157 	cc = 'intelc'
   158 elif msvc and (not gcc or conf.env['msvc']):
   158 elif msvc and (not gcc or not conf.env['mingw']):
   159 	Tool('default').generate(conf.env)
   159 	Tool('default').generate(conf.env)
   160 	conf.Define("MSVC")
   160 	conf.Define("MSVC")
   161 	cc = 'msvc'
   161 	cc = 'msvc'
   162 elif gcc:
   162 elif gcc:
   163 	cc = 'gcc'
   163 	cc = 'gcc'