diff options
author | David Cournapeau <cournape@gmail.com> | 2009-11-19 04:55:31 (GMT) |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-11-19 04:55:31 (GMT) |
commit | 7b9a5fe2840d22272d76cf4386ee56422148a04a (patch) | |
tree | 85d923cf21221b1d31cca6fbd2001cb532e7b193 /src | |
parent | 16aea2206975ac22c984c7abde7124a5033d0464 (diff) | |
download | SCons-7b9a5fe2840d22272d76cf4386ee56422148a04a.zip SCons-7b9a5fe2840d22272d76cf4386ee56422148a04a.tar.gz SCons-7b9a5fe2840d22272d76cf4386ee56422148a04a.tar.bz2 |
ENH: add a wrapper around msvc_setup_env to guarantee the function is called only once.
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Tool/MSCommon/vc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index c5f5936..8d5dba8 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -314,6 +314,16 @@ def get_host_target(env): return host_platform, target_platform +def msvc_setup_env_once(env): + try: + has_run = env["MSVC_SETUP_RUN"] + except KeyError: + has_run = False + + if not has_run: + msvc_setup_env(env) + env["MSVC_SETUP_RUN"] = False + def msvc_setup_env(env): debug('msvc_setup_env()') |