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.append_value('LINKFLAGS', ['/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:'
  
  	# 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']
  
  	v.LIB_ST            = '%s.lib'
  	v.LIBPATH_ST        = '/LIBPATH:%s'
  	v.STLIB_ST          = '%s.lib'
  	v.STLIBPATH_ST      = '/LIBPATH:%s'
  
  	if v.MSVC_MANIFEST:
  		v.append_value('LINKFLAGS', ['/MANIFEST'])
  
  	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'
  
  	v.LINKFLAGS_cstlib  = []
  	v.cstlib_PATTERN    = v.cxxstlib_PATTERN = '%s.lib'
  
  	v.cprogram_PATTERN  = v.cxxprogram_PATTERN = '%s.exe'
  
  	v.def_PATTERN       = '/def:%s'
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 . append_value ( 'LINKFLAGS' , [ '/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:' # 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' ] v . LIB_ST = '%s.lib' v . LIBPATH_ST = '/LIBPATH:%s' v . STLIB_ST = '%s.lib' v . STLIBPATH_ST = '/LIBPATH:%s' if v . MSVC_MANIFEST : v . append_value ( 'LINKFLAGS' , [ '/MANIFEST' ] ) 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' v . LINKFLAGS_cstlib = [ ] v . cstlib_PATTERN = v . cxxstlib_PATTERN = '%s.lib' v . cprogram_PATTERN = v . cxxprogram_PATTERN = '%s.exe' v . def_PATTERN = '/def:%s'