BUG: return early with warning if no version of vc is found.
authorcournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 19 Nov 2009 05:07:41 +0000 (05:07 +0000)
committercournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 19 Nov 2009 05:07:41 +0000 (05:07 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4457 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/MSCommon/vc.py

index 6415783576fa557e2ebdcd634900522ea7e92623..130acf5d5803e5046d736bdf5d391a5761943bb4 100644 (file)
@@ -245,6 +245,12 @@ def msvc_setup_env(env):
     debug('msvc_setup_env()')
 
     version = get_default_version(env)
+    if version is None:
+        warn_msg = "No version of Visual Studio compiler found - C/C++ " \
+                   "compilers most likely not set correctly"
+        SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg)
+        return None
+
     host_platform, target_platform = get_host_target(env)
     debug('msvc_setup_env: using specified MSVC version %s\n' % repr(version))