Skip to content

Commit

Permalink
- added support for compilation using Microsoft Visual Studio 2008
Browse files Browse the repository at this point in the history
  • Loading branch information
blep committed Mar 13, 2010
1 parent cd6cb5d commit e1b2645
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ where PLTFRM may be one of:
msvc70 Microsoft Visual Studio 2002
msvc71 Microsoft Visual Studio 2003
msvc80 Microsoft Visual Studio 2005
msvc90 Microsoft Visual Studio 2008
linux-gcc Gnu C++ (linux, also reported to work for Mac OS X)

Notes: if you are building with Microsoft Visual Studio 2008, you need to
setup the environment by running vcvars32.bat (e.g. MSVC 2008 command prompt)
before running scons.

adding platform is fairly simple. You need to change the Sconstruct file
Adding platform is fairly simple. You need to change the Sconstruct file
to do so.

and TARGET may be:
Expand Down
14 changes: 13 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ options = Variables()
options.Add( EnumVariable('platform',
'Platform (compiler/stl) used to build the project',
'msvc71',
allowed_values='suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 linux-gcc'.split(),
allowed_values='suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 msvc90 linux-gcc'.split(),
ignorecase=2) )

try:
Expand Down Expand Up @@ -102,6 +102,18 @@ elif platform == 'msvc80':
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
env.Tool( tool )
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
elif platform == 'msvc90':
env['MSVS_VERSION']='9.0'
# Scons 1.2 fails to detect the correct location of the platform SDK.
# So we propagate those from the environment. This requires that the
# user run vcvars32.bat before compiling.
if 'INCLUDE' in os.environ:
env['ENV']['INCLUDE'] = os.environ['INCLUDE']
if 'LIB' in os.environ:
env['ENV']['LIB'] = os.environ['LIB']
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
env.Tool( tool )
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
elif platform == 'mingw':
env.Tool( 'mingw' )
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
Expand Down
2 changes: 1 addition & 1 deletion makerelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Requires Python 2.6
Example of invocation (use to test the script):
python makerelease.py --platform=msvc6,msvc71,msvc80,mingw -ublep 0.6.0 0.7.0-dev
python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev
When testing this script:
python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep test-0.5.0 test-0.6.0-dev
Expand Down

0 comments on commit e1b2645

Please sign in to comment.