From a5d7b5486b99f909ed0b598fb2d697e4724e14d5 Mon Sep 17 00:00:00 2001 From: cournape Date: Thu, 19 Nov 2009 04:55:31 +0000 Subject: [PATCH] ENH: add a wrapper around msvc_setup_env to guarantee the function is called only once. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4439 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/MSCommon/vc.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index c5f59361..8d5dba85 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()') -- 2.26.2