summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/msvc.py
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:28 +0000
committerLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:28 +0000
commit0ed55e71a9f4b9cda836c6a4a5408cece60db0c6 (patch)
treeb1e82f6e428ac15ed9b4de93e48d8079420d537d /src/engine/SCons/Tool/msvc.py
parentfe00e4f75ba00298c30d6854b245c2a42c6542b8 (diff)
parent738149c9bfb9965d013d01ef99f9bb1c2819e7e8 (diff)
Merge commit 'upstream/2.0.0'
Diffstat (limited to 'src/engine/SCons/Tool/msvc.py')
-rw-r--r--src/engine/SCons/Tool/msvc.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index f145816..8c13580 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/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):