parameters: (conf)
docstring: Setup the flags required for executing the msvc compiler
docstring_summary: Setup the flags required for executing the msvc compiler
docstring_tokens: Setup the flags required for executing the msvc compiler
function: def msvc_common_flags(conf):
  	"""
  	Setup the flags required for executing the msvc compiler
  	"""
  	v = conf.env
  
  	v['DEST_BINFMT'] = 'pe'
  	v.append_value('CFLAGS', ['/nologo'])
  	v.append_value('CXXFLAGS', ['/nologo'])
  	v['DEFINES_ST']     = '/D%s'
  
  	v['CC_SRC_F']     = ''
  	v['CC_TGT_F']     = ['/c', '/Fo']
  	v['CXX_SRC_F']    = ''
  	v['CXX_TGT_F']    = ['/c', '/Fo']
  
  	if (v.MSVC_COMPILER == 'msvc' and v.MSVC_VERSION >= 8) or (v.MSVC_COMPILER == 'wsdk' and v.MSVC_VERSION >= 6):
  		v['CC_TGT_F']= ['/FC'] + v['CC_TGT_F']
  		v['CXX_TGT_F']= ['/FC'] + v['CXX_TGT_F']
  
  	v['CPPPATH_ST']   = '/I%s' # template for adding include paths
  
  	v['AR_TGT_F'] = v['CCLNK_TGT_F'] = v['CXXLNK_TGT_F'] = '/OUT:'
  
  	# Subsystem specific flags
  	v['CFLAGS_CONSOLE']   = v['CXXFLAGS_CONSOLE']   = ['/SUBSYSTEM:CONSOLE']
  	v['CFLAGS_NATIVE']    = v['CXXFLAGS_NATIVE']    = ['/SUBSYSTEM:NATIVE']
  	v['CFLAGS_POSIX']     = v['CXXFLAGS_POSIX']     = ['/SUBSYSTEM:POSIX']
  	v['CFLAGS_WINDOWS']   = v['CXXFLAGS_WINDOWS']   = ['/SUBSYSTEM:WINDOWS']
  	v['CFLAGS_WINDOWSCE'] = v['CXXFLAGS_WINDOWSCE'] = ['/SUBSYSTEM:WINDOWSCE']
  
  	# CRT specific flags
  	v['CFLAGS_CRT_MULTITHREADED']     = v['CXXFLAGS_CRT_MULTITHREADED']     = ['/MT']
  	v['CFLAGS_CRT_MULTITHREADED_DLL'] = v['CXXFLAGS_CRT_MULTITHREADED_DLL'] = ['/MD']
  
  	v['CFLAGS_CRT_MULTITHREADED_DBG']     = v['CXXFLAGS_CRT_MULTITHREADED_DBG']     = ['/MTd']
  	v['CFLAGS_CRT_MULTITHREADED_DLL_DBG'] = v['CXXFLAGS_CRT_MULTITHREADED_DLL_DBG'] = ['/MDd']
  
  	# linker
  	v['LIB_ST']            = '%s.lib' # template for adding shared libs
  	v['LIBPATH_ST']        = '/LIBPATH:%s' # template for adding libpaths
  	v['STLIB_ST']          = '%s.lib'
  	v['STLIBPATH_ST']      = '/LIBPATH:%s'
  
  	v.append_value('LINKFLAGS', ['/NOLOGO'])
  	if v['MSVC_MANIFEST']:
  		v.append_value('LINKFLAGS', ['/MANIFEST'])
  
  	# shared library
  	v['CFLAGS_cshlib']     = []
  	v['CXXFLAGS_cxxshlib'] = []
  	v['LINKFLAGS_cshlib']  = v['LINKFLAGS_cxxshlib'] = ['/DLL']
  	v['cshlib_PATTERN']    = v['cxxshlib_PATTERN'] = '%s.dll'
  	v['implib_PATTERN']    = '%s.lib'
  	v['IMPLIB_ST']         = '/IMPLIB:%s'
  
  	# static library
  	v['LINKFLAGS_cstlib']  = []
  	v['cstlib_PATTERN']    = v['cxxstlib_PATTERN'] = '%s.lib'
  
  	# program
  	v['cprogram_PATTERN']  = v['cxxprogram_PATTERN']    = '%s.exe'
function_tokens: def msvc_common_flags ( conf ) : v = conf . env v [ 'DEST_BINFMT' ] = 'pe' v . append_value ( 'CFLAGS' , [ '/nologo' ] ) v . append_value ( 'CXXFLAGS' , [ '/nologo' ] ) v [ 'DEFINES_ST' ] = '/D%s' v [ 'CC_SRC_F' ] = '' v [ 'CC_TGT_F' ] = [ '/c' , '/Fo' ] v [ 'CXX_SRC_F' ] = '' v [ 'CXX_TGT_F' ] = [ '/c' , '/Fo' ] if ( v . MSVC_COMPILER == 'msvc' and v . MSVC_VERSION >= 8 ) or ( v . MSVC_COMPILER == 'wsdk' and v . MSVC_VERSION >= 6 ) : v [ 'CC_TGT_F' ] = [ '/FC' ] + v [ 'CC_TGT_F' ] v [ 'CXX_TGT_F' ] = [ '/FC' ] + v [ 'CXX_TGT_F' ] v [ 'CPPPATH_ST' ] = '/I%s' # template for adding include paths v [ 'AR_TGT_F' ] = v [ 'CCLNK_TGT_F' ] = v [ 'CXXLNK_TGT_F' ] = '/OUT:' # Subsystem specific flags v [ 'CFLAGS_CONSOLE' ] = v [ 'CXXFLAGS_CONSOLE' ] = [ '/SUBSYSTEM:CONSOLE' ] v [ 'CFLAGS_NATIVE' ] = v [ 'CXXFLAGS_NATIVE' ] = [ '/SUBSYSTEM:NATIVE' ] v [ 'CFLAGS_POSIX' ] = v [ 'CXXFLAGS_POSIX' ] = [ '/SUBSYSTEM:POSIX' ] v [ 'CFLAGS_WINDOWS' ] = v [ 'CXXFLAGS_WINDOWS' ] = [ '/SUBSYSTEM:WINDOWS' ] v [ 'CFLAGS_WINDOWSCE' ] = v [ 'CXXFLAGS_WINDOWSCE' ] = [ '/SUBSYSTEM:WINDOWSCE' ] # CRT specific flags v [ 'CFLAGS_CRT_MULTITHREADED' ] = v [ 'CXXFLAGS_CRT_MULTITHREADED' ] = [ '/MT' ] v [ 'CFLAGS_CRT_MULTITHREADED_DLL' ] = v [ 'CXXFLAGS_CRT_MULTITHREADED_DLL' ] = [ '/MD' ] v [ 'CFLAGS_CRT_MULTITHREADED_DBG' ] = v [ 'CXXFLAGS_CRT_MULTITHREADED_DBG' ] = [ '/MTd' ] v [ 'CFLAGS_CRT_MULTITHREADED_DLL_DBG' ] = v [ 'CXXFLAGS_CRT_MULTITHREADED_DLL_DBG' ] = [ '/MDd' ] # linker v [ 'LIB_ST' ] = '%s.lib' # template for adding shared libs v [ 'LIBPATH_ST' ] = '/LIBPATH:%s' # template for adding libpaths v [ 'STLIB_ST' ] = '%s.lib' v [ 'STLIBPATH_ST' ] = '/LIBPATH:%s' v . append_value ( 'LINKFLAGS' , [ '/NOLOGO' ] ) if v [ 'MSVC_MANIFEST' ] : v . append_value ( 'LINKFLAGS' , [ '/MANIFEST' ] ) # shared library v [ 'CFLAGS_cshlib' ] = [ ] v [ 'CXXFLAGS_cxxshlib' ] = [ ] v [ 'LINKFLAGS_cshlib' ] = v [ 'LINKFLAGS_cxxshlib' ] = [ '/DLL' ] v [ 'cshlib_PATTERN' ] = v [ 'cxxshlib_PATTERN' ] = '%s.dll' v [ 'implib_PATTERN' ] = '%s.lib' v [ 'IMPLIB_ST' ] = '/IMPLIB:%s' # static library v [ 'LINKFLAGS_cstlib' ] = [ ] v [ 'cstlib_PATTERN' ] = v [ 'cxxstlib_PATTERN' ] = '%s.lib' # program v [ 'cprogram_PATTERN' ] = v [ 'cxxprogram_PATTERN' ] = '%s.exe'