diff options
author | Steven Knight <knight@baldmt.com> | 2004-03-16 07:16:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-03-16 07:16:02 (GMT) |
commit | 726790558e9e9b22ec0897ceeae5b83144197fe5 (patch) | |
tree | 391bd4bdacc955aade62b680bb213f81a0f59726 /src/engine/SCons/Tool/msvc.py | |
parent | d337499882865fcee240d284869525b17aed0d24 (diff) | |
download | SCons-726790558e9e9b22ec0897ceeae5b83144197fe5.zip SCons-726790558e9e9b22ec0897ceeae5b83144197fe5.tar.gz SCons-726790558e9e9b22ec0897ceeae5b83144197fe5.tar.bz2 |
Fix use of MSVS_IGNORE_IDE_PATHS. Win32 fixes for various tests.
Diffstat (limited to 'src/engine/SCons/Tool/msvc.py')
-rw-r--r-- | src/engine/SCons/Tool/msvc.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py index a916501..1a2cb1c 100644 --- a/src/engine/SCons/Tool/msvc.py +++ b/src/engine/SCons/Tool/msvc.py @@ -324,7 +324,7 @@ def get_msvc_paths(version=None, use_mfc_dirs=0): return (include_path, lib_path, exe_path) -def get_msvc_default_paths(version = None): +def get_msvc_default_paths(version=None, use_mfc_dirs=0): """Return a 3-tuple of (INCLUDE, LIB, PATH) as the values of those three environment variables that should be set in order to execute the MSVC tools properly. This will only return the default @@ -345,9 +345,9 @@ def get_msvc_default_paths(version = None): pass if float(version) >= 7.0: - return _get_msvc7_default_paths(version) + return _get_msvc7_default_paths(version, use_mfc_dirs) else: - return _get_msvc6_default_paths(version) + return _get_msvc6_default_paths(version, use_mfc_dirs) def validate_vars(env): """Validate the PDB, PCH, and PCHSTOP construction variables.""" @@ -456,13 +456,14 @@ def generate(env): try: version = SCons.Tool.msvs.get_default_visualstudio_version(env) - if env.has_key('MSVS_IGNORE_IDE_PATHS') and env['MSVS_IGNORE_IDE_PATHS']: - include_path, lib_path, exe_path = get_msvc_default_paths(version) + # By default, add the MFC directories, because this is what + # we've been doing for a long time. We may change this. + use_mfc_dirs = env.get('MSVS_USE_MFC_DIRS', 1) + if env.get('MSVS_IGNORE_IDE_PATHS', 0): + _get_paths = get_msvc_default_paths else: - # By default, add the MFC directories, because this is what - # we've been doing for a long time. We may change this. - use_mfc_dirs = env.get('MSVS_USE_MFC_DIRS', 1) - include_path, lib_path, exe_path = get_msvc_paths(version, use_mfc_dirs) + _get_paths = get_msvc_paths + include_path, lib_path, exe_path = _get_paths(version, use_mfc_dirs) # since other tools can set these, we just make sure that the # relevant stuff from MSVS is in there somewhere. |