[Scons-users] Which is the earliest scons version supporting VC++10?
Saurabh Bhatnagar
saurabh.b.bhatnagar at oracle.com
Thu Dec 27 05:58:51 EST 2012
Appreciate your reply.
However, in my scons env(custom) I do not see MSVC_VERSION.
Instead, I see CXXVERSION=6.0.0.0 as attached.
(In this case we ran using MSVS 2005- VC++6).
From: Gary Oberbrunner [mailto:garyo at oberbrunner.com]
Sent: Tuesday, December 25, 2012 12:15 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Which is the earliest scons version supporting VC++10?
MSVC10 and MSVC11 compiler support is really good only in the latest unreleased branch; see https://bitbucket.org/scons/scons/commits/0da1edff14b9252f5347431ac9c8a733ec52ce9f.
To set the desired compiler version, do env=Environment(MSVC_VERSION="x.y"), and use TARGET_ARCH for 32 vs. 64 bit builds. See the man page.
On Mon, Dec 24, 2012 at 5:26 AM, Saurabh Bhatnagar <HYPERLINK "mailto:saurabh.b.bhatnagar at oracle.com" \nsaurabh.b.bhatnagar at oracle.com> wrote:
Well the query is actually in my subject.
To detect the new compiler, I need to know which scons env variable to trap.
Now we need to support 2 Microsoft c++ compilers(vc10 and vc6) on the same OS(windows 2003 server).
--
Warm Regards,
From: William Deegan [mailto:HYPERLINK "mailto:bill at baddogconsulting.com" \nbill at baddogconsulting.com]
Sent: Thursday, December 20, 2012 11:42 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Which is the earliest scons version supporting VC++10?
Saurabh,
The code below looks like your own code and not SCons code so there's no reasonable way we can comment on it..
Plus your text below doesn't seem to be related to your subject..?
-Bill
On Dec 20, 2012, at 12:42 AM, Saurabh Bhatnagar <HYPERLINK "mailto:saurabh.b.bhatnagar at oracle.com" \nsaurabh.b.bhatnagar at oracle.com> wrote:
Hi Users,
We are upgrading to VC++10(32 ,64), but need to support builds using VC7(32 bit) and VC8(64bit).
We have modified existing compiler detection scons custom code using
msvc_ver=env['MSVC_COMPILER']
Is this the right variable or do we have some other more accurate variable like CXX that has value like 10?
def DevDetectPlatform(env):
""" Autodetect current platform.
scons plat=PLAT will overide it.
"""
plat=ARGUMENTS.get('plat', None)
cc=ARGUMENTS.get('cc', None)
bit=ARGUMENTS.get('bit', '32')
if not (plat):
#We do not use environment platform anymore
if (os.environ.get('PLAT',None)):
print ("scons: WARNING: Ignoring system environment PLAT=%s" %os.environ.get('PLAT',None))
# figure out using the machine information
if (sys.platform == 'win32'):
(major,minor,build,platform,pack)=sys.getwindowsversion()
#WIN2K
if (major == 5 and minor == 0):
plat='NT40_INTEL'
#XP or WIN2003, set both as for 2003
#use V10 for all VC++10, V8 for 64 and V7 for 32
elif (major == 5 and (minor == 1 or minor == 2)):
plat='WIN2K3'
#there is another env variable named close to this, may want to change this
msvc_ver=env['MSVC_COMPILER']
if msvc_ver == '10':
cc='V10'
elif bit == '64':
cc='V8'
elif bit == '32':
cc='V7'
--
Warm Regards,
_______________________________________________
Scons-users mailing list
HYPERLINK "mailto:Scons-users at scons.org" \nScons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
HYPERLINK "mailto:Scons-users at scons.org"Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121227/46104f55/attachment-0001.html>
-------------- next part --------------
'AR': 'ar',
'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET',
'ARFLAGS': ['r'],
'AS': 'as',
'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
'ASFLAGS': [],
'ASPPCOM': '$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES',
'ASPPFLAGS': '$ASFLAGS',
'BUILD': 'buildout',
'BUILDERS': {'CFile': <SCons.Memoize.BuilderBase object at 0x204fb0d0>, 'DJavaDir': <SCons.Memoize.BuilderBase object at 0x204e87b0>, 'Rsync': <SCons.Memoize.BuilderBase object at 0x204e31b0>, 'ScpRCVersion': <SCons.Memoize.BuilderBase object at 0x204f3170>, 'StaticLibrary': <SCons.Memoize.MultiStepBuilder object at 0x204d59d0>, 'DJavaFile': <SCons.Memoize.BuilderBase object at 0x204e88b0>, 'RunTest': <SCons.Memoize.BuilderBase object at 0x204ed710>, 'Program': <SCons.Memoize.MultiStepBuilder object at 0x204d52f0>, 'War': <SCons.Memoize.BuilderBase object at 0x204ed610>, 'UnJar': <SCons.Memoize.BuilderBase object at 0x204ed110>, 'CXXFile': <SCons.Memoize.BuilderBase object at 0x204fb2b0>, 'Object': <SCons.Memoize.MultiStepBuilder object at 0x204d5690>, 'VersantDb': <SCons.Memoize.BuilderBase object at 0x204dcc90>, 'VersantSchema': <SCons.Memoize.BuilderBase object at 0x204dce30>, 'Moc': <SCons.Memoize.BuilderBase object at 0x204e3e30>, 'LoadableModule': <SCons.Memoize.MultiStepBuilder object at 0x204d5530>, 'SharedLibrary': <SCons.Memoize.MultiStepBuilder object at 0x204d5370>, 'ScpVersion': <SCons.Memoize.BuilderBase object at 0x204edeb0>, 'StaticObject': <SCons.Memoize.MultiStepBuilder object at 0x204d5690>, 'SharedObject': <SCons.Memoize.MultiStepBuilder object at 0x204d5790>, 'Uic': <SCons.Memoize.BuilderBase object at 0x204e3790>, 'DJava': <SCons.Memoize.MultiStepBuilder object at 0x204e85f0>, 'Library': <SCons.Memoize.MultiStepBuilder object at 0x204d59d0>, 'DJar': <SCons.Memoize.MultiStepBuilder object at 0x204ed230>, 'VersantDbRemove': <SCons.Memoize.BuilderBase object at 0x204dc790>},
'CC': '/usr/VISUALAGE8/usr/vacpp/bin/xlc',
'CCCOM': '$CC -o $TARGET -c $CCFLAGS $_CCCOMCOM $SOURCES',
'CCFLAGS': ['-qchars=signed', '-g'],
'CCVERSION': '6.0.0.0',
'CFG': '',
'CFILESUFFIX': '.c',
'CHFILESUFFIX': '.h',
'CONFIGUREDIR': '#/.sconf_temp',
'CONFIGURELOG': '#/config.log',
'CPPDEFPREFIX': '-D',
'CPPDEFSUFFIX': '',
'CPPSUFFIXES': [ '.c',
'.C',
'.cxx',
'.cpp',
'.c++',
'.cc',
'.h',
'.H',
'.hxx',
'.hpp',
'.hh',
'.F',
'.fpp',
'.FPP',
'.m',
'.mm',
'.S',
'.spp',
'.SPP'],
'CXX': '/usr/VISUALAGE8/usr/vacpp/bin/xlC',
'CXXCOM': '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES',
'CXXFILESUFFIX': '.cpp',
'CXXFLAGS': ['$CCFLAGS', '-qfuncsect', '-qrtti=all', '-qnotempinc'],
'CXXHFILESUFFIX': '.h',
'CXXVERSION': '6.0.0.0',
'DEFAULT_ENV': <SCons.Memoize.SConsEnvironment object at 0x20335410>,
'DEVBUILDTYPE': 'built by sbhatnag',
'DEVTIMESTMAP': 'no time stamp',
'DEV_JAR_SEP': '\\$$',
'DEV_ROOT': '/tools/rd/devscons',
'DEV_TARGETS': [],
'DEV_TOOL': '/tools/rd/devscons/v2.0',
'DEV_USER': 'sbhatnag',
'DSP': 0,
'DSP_SRC': ['.cpp', '.c'],
'DSP_SRC_OTHER': ['*.txt'],
'DSUFFIXES': ['.d'],
'Dir': <SCons.Defaults.Variable_Method_Caller instance at 0x2026c490>,
'Dirs': <SCons.Defaults.Variable_Method_Caller instance at 0x2026c4b8>,
'ENV': { 'HOME': '/user/sbhatnag',
'LIBPATH': '/usr/VISUALAGE8/usr/lpp/xlC/lib:/usr/VISUALAGE8/usr/vacpp/lib:/usr/VISUALAGE8/usr/vac/lib:/usr/VISUALAGE8/usr/ccs/lib:/usr/VISUALAGE8/usr/lib',
'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'},
'ESCAPE': <function escape at 0x203398b0>,
'EXP_HEADER': None,
'EXT_SRC_SUFFIX': ['$VERSANT_IMP', '$QT_UISUFFIX'],
'FRAMEWORKPATH': [],
'FRAMEWORKS': [],
'File': <SCons.Defaults.Variable_Method_Caller instance at 0x2026c4e0>,
'HOST': 'ibmrds2',
'IDLSUFFIXES': ['.idl', '.IDL'],
'IGNORE_SRC': None,
'INCPREFIX': '-I',
'INCSUFFIX': '',
'INSTALL': <function copyFunc at 0x2026d3f0>,
'JAPPLETS': None,
'JAR': 'jar',
'JARCOM': "${TEMPFILE('$_JARCOM')}",
'JARFLAGS': ['cf'],
'JARSIGN': 'jarsigner',
'JARSIGNCOM': '$JARSIGN $JARSIGNFLAGS $TARGET $JARSIGNALIAS',
'JARSUFFIX': '.jar',
'JAVAC': 'javac',
'JAVACFLAGS': [],
'JAVACLASSPATH': [],
'JAVACLASSSUFFIX': '.class',
'JAVACOM': "${TEMPFILE('$_JAVACOM')}",
'JAVASOURCEPATH': [],
'JAVASUFFIX': '.java',
'LDMODULE': '$SHLINK',
'LDMODULECOM': '$SHLINKCOM',
'LDMODULEFLAGS': '$SHLINKFLAGS',
'LDMODULEPREFIX': '$SHLIBPREFIX',
'LDMODULESUFFIX': '$SHLIBSUFFIX',
'LIBDIRPREFIX': '-L',
'LIBDIRSUFFIX': '',
'LIBEMITTER': [<qt._Automoc instance at 0x204e49b8>],
'LIBLINKPREFIX': '-l',
'LIBLINKSUFFIX': '',
'LIBPREFIX': 'lib',
'LIBPREFIXES': '$LIBPREFIX',
'LIBSUFFIX': '.a',
'LIBSUFFIXES': ['$LIBSUFFIX', '$SHLIBSUFFIX'],
'LINK': '$SMARTLINK',
'LINKCOM': '$LINK -o $TARGET $LINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS',
'LINKFLAGS': ['$SMARTLINKFLAGS', '-bnoautoexp', '-brtl', '-bgc', '-bmaxdata:0x80000000', '-bloadmap:$LOADMAP', '-bh:5'],
'MAXLINELENGTH': 21576,
'MODE': 'Debug',
'NMX_IDL_SUFFIX': '.idl',
'OBJPREFIX': '',
'OBJSUFFIX': '.o',
'PDFPREFIX': '',
'PDFSUFFIX': '.pdf',
'PLAT': 'AIX5L',
'PLATFORM': 'aix',
'PLAT_CFG': 'AIX5L',
'PLAT_DIR_ABS': '/user/sbhatnag/SCPF/buildout/AIX5L/Debug',
'PLAT_DIR_REL': 'buildout/AIX5L/Debug',
'PRODUCT_NAME': 'Supply Chain Planning Foundation',
'PROGEMITTER': [<qt._Automoc instance at 0x204e49b8>],
'PROGPREFIX': '',
'PROGSUFFIX': '',
'PROJ_ROOT': '/user/sbhatnag/SCPF',
'PSPAWN': <function piped_env_spawn at 0x203394f0>,
'PSPREFIX': '',
'PSSUFFIX': '.ps',
'QTDIR': None,
'QT_AUTOSCAN': 0,
'QT_BINPATH': '$QTDIR/bin',
'QT_CPPPATH': '$QTDIR/include',
'QT_LIB': 'qt',
'QT_LIBPATH': '$QTDIR/lib',
'QT_MOC': '$QT_BINPATH/moc',
'QT_MOCCXXPREFIX': '',
'QT_MOCCXXSUFFIX': '.moc',
'QT_MOCFROMCXXCOM': [ ['$QT_MOC', '$QT_MOCFROMCXXFLAGS', '-o', '${TARGETS[0]}', '$SOURCE'],
<SCons.Memoize.FunctionAction object at 0x204e3eb0>,
<SCons.Memoize.FunctionAction object at 0x204e3f90>],
'QT_MOCFROMCXXFLAGS': ['-i'],
'QT_MOCFROMHCOM': [ ['$QT_MOC', '$QT_MOCFROMHFLAGS', '-o', '${TARGETS[0]}', '$SOURCE'],
<SCons.Memoize.FunctionAction object at 0x204e3db0>],
'QT_MOCFROMHFLAGS': [],
'QT_MOCHPREFIX': 'moc_',
'QT_MOCHSUFFIX': '$CXXFILESUFFIX',
'QT_UIC': '$QT_BINPATH/uic',
'QT_UICCOM': [ ['$QT_UIC', '$QT_UICDECLFLAGS', '-o', '${TARGETS[0]}', '$SOURCE'],
['$QT_UIC', '$QT_UICIMPLFLAGS', '-impl', '${TARGETS[0].file}', '-o', '${TARGETS[1]}', '$SOURCE'],
['$QT_MOC', '$QT_MOCFROMHFLAGS', '-o', '${TARGETS[2]}', '${TARGETS[0]}'],
<SCons.Memoize.FunctionAction object at 0x204e3170>],
'QT_UICDECLFLAGS': [],
'QT_UICDECLPREFIX': '',
'QT_UICDECLSUFFIX': '.h',
'QT_UICIMPLFLAGS': [],
'QT_UICIMPLPREFIX': 'uic_',
'QT_UICIMPLSUFFIX': '$CXXFILESUFFIX',
'QT_UISUFFIX': '.ui',
'RANLIB': 'ranlib',
'RANLIBFLAGS': [],
'RDirs': <SCons.Defaults.Variable_Method_Caller instance at 0x2026c508>,
'REDISTRIBUTE': {},
'RSYNC': 0,
'RUN_UNIT_TESTS': 0,
'SCANNERS': [],
'SCP_VERSION_CPP': '$CXXFILESUFFIX',
'SCP_VERSION_CPPTEMP': '.scptemp',
'SCP_VERSION_RC': '.rc',
'SCP_VERSION_RCTEMP': '.rctemp',
'SHCC': '/usr/vac/bin/xlc_r',
'SHCCCOM': '$SHCC -o $TARGET -c $SHCCFLAGS $_CCCOMCOM $SOURCES',
'SHCCFLAGS': ['$CCFLAGS'],
'SHCXX': '/usr/vacpp/bin/xlC_r',
'SHCXXCOM': '$SHCXX -o $TARGET -c $SHCXXFLAGS $_CCCOMCOM $SOURCES',
'SHCXXFLAGS': ['$CXXFLAGS'],
'SHELL': 'sh',
'SHLIBEMITTER': [<qt._Automoc instance at 0x204e4af8>],
'SHLIBPREFIX': '$LIBPREFIX',
'SHLIBSUFFIX': '.so',
'SHLINK': '$LINK',
'SHLINKCOM': '$SHLINK -o $TARGET $SHLINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS',
'SHLINKFLAGS': ['$LINKFLAGS', '-qmkshrobj', '-qsuppress=1501-218'],
'SHOBJPREFIX': '$OBJPREFIX',
'SHOBJSUFFIX': '.pic.o',
'SMARTLINK': <function smart_link at 0x2033d7f0>,
'SMARTLINKFLAGS': <function smart_linkflags at 0x2033d7b0>,
'SPAWN': <function spawnvpe_spawn at 0x203393f0>,
'SRC': 'src',
'STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME': 0,
'SUBMODE': 'Debug',
'SUITE': '9.0',
'TEMPFILE': <class SCons.Platform.TempFileMunge at 0x20278c60>,
'TEMPFILEPREFIX': '@',
'THIRD_VERSION': {},
'TOOLS': [ 'aixlink',
'aixcc',
'aixc++',
'as',
'ar',
'msvc',
'versant',
'rsync',
'qt',
'javac',
'jar',
'war',
'testrunner',
'scpversion'],
'VERSANT_BIN': '$VERSANT_ROOT/bin',
'VERSANT_IMP': '.imp',
'VERSANT_SCH': '.sch',
'VERSANT_SCHEMA_EXE': '$VERSANT_ROOT/bin/schcomp',
'VSDRESSUFFIX': '.rc',
'WARCOM': <SCons.Memoize.FunctionAction object at 0x204ed510>,
'WARCOMPRESSION': 8,
'WARFLAGS': [],
'WARSUFFIX': '.war',
'WARXDIRS': None,
'WARXFILES': None,
'XML_INSTALL': 0,
'_CCCOMCOM': '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS',
'_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}',
'_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)',
'_JARCHDIR': <function jarChdir at 0x204ebdb0>,
'_JARCOM': '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES',
'_JARFLAGS': <function jarFlags at 0x204ebd70>,
'_JARMANIFEST': <function jarManifest at 0x204ebd30>,
'_JARSOURCES': <function jarSources at 0x204ebcf0>,
'_JAVACLASSPATH': <function getClassPath at 0x204eb470>,
'_JAVACOM': '$JAVAC $JAVACFLAGS $_JAVACLASSPATH -d ${TARGET.attributes.java_classdir} $_JAVASOURCEPATH $SOURCES',
'_JAVASOURCEPATH': <function getSourcePath at 0x204eb4b0>,
'_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)',
'_LIBFLAGS': '${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIX, LIBSUFFIX, __env__)}',
'_PDB': <function DevPdbGenerator at 0x2044c7f0>,
'__RPATH': '$_RPATH',
'_concat': <function _concat at 0x2026d470>,
'_defines': <function _defines at 0x2026d4f0>,
'_stripixes': <function _stripixes at 0x2026d4b0>}
scons: done reading SConscript files.
scons: Building targets ..
More information about the Scons-users
mailing list