diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 09:21:32 +0000 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-06-15 09:21:32 +0000 |
commit | 07fc59e19636a4fc97a18b2038f3fe1c72a94000 (patch) | |
tree | 79d4a6239d81b2ccb4752d4f5ca25e0a7d3b4d4b /engine/SCons/Tool/msvc.py | |
parent | 7f642861f3946d4241cbd668de258293ba92767a (diff) | |
parent | 340d57481935334465037d97c0db1555b70c0eb1 (diff) |
Merge commit 'upstream/2.0.0'
Diffstat (limited to 'engine/SCons/Tool/msvc.py')
-rw-r--r-- | engine/SCons/Tool/msvc.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/engine/SCons/Tool/msvc.py b/engine/SCons/Tool/msvc.py index f145816..8c13580 100644 --- a/engine/SCons/Tool/msvc.py +++ b/engine/SCons/Tool/msvc.py @@ -31,11 +31,10 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvc.py 4720 2010/03/24 03:14:11 jars" +__revision__ = "src/engine/SCons/Tool/msvc.py 5023 2010/06/14 22:05:46 scons" import os.path import re -import string import sys import SCons.Action @@ -55,11 +54,11 @@ CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++'] def validate_vars(env): """Validate the PCH and PCHSTOP construction variables.""" - if env.has_key('PCH') and env['PCH']: - if not env.has_key('PCHSTOP'): - raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined." + if 'PCH' in env and env['PCH']: + if 'PCHSTOP' not in env: + raise SCons.Errors.UserError("The PCHSTOP construction must be defined if PCH is defined.") if not SCons.Util.is_String(env['PCHSTOP']): - raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP'] + raise SCons.Errors.UserError("The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']) def pch_emitter(target, source, env): """Adds the object file target.""" @@ -99,7 +98,7 @@ def object_emitter(target, source, env, parent_emitter): # See issue #2505 for a discussion of what to do if it turns # out this assumption causes trouble in the wild: # http://scons.tigris.org/issues/show_bug.cgi?id=2505 - if env.has_key('PCH'): + if 'PCH' in env: pch = env['PCH'] if str(target[0]) != SCons.Util.splitext(str(pch))[0] + '.obj': env.Depends(target, pch) @@ -254,9 +253,9 @@ def generate(env): env['PCHCOM'] = '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS' env['BUILDERS']['PCH'] = pch_builder - if not env.has_key('ENV'): + if 'ENV' not in env: env['ENV'] = {} - if not env['ENV'].has_key('SystemRoot'): # required for dlls in the winsxs folders + if 'SystemRoot' not in env['ENV']: # required for dlls in the winsxs folders env['ENV']['SystemRoot'] = SCons.Platform.win32.get_system_root() def exists(env): |