summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorDaniel <dmoody256@gmail.com>2018-08-13 05:28:05 (GMT)
committerDaniel <dmoody256@gmail.com>2018-08-13 05:28:05 (GMT)
commit57d09cd12f950ba938ab0164f3b68ed937353318 (patch)
treec1508ec7442c392ef70418ca8fde4e60bf78f762 /src/engine/SCons
parent5d21b1cac7605f4df43ddc6db30011e6d1006859 (diff)
downloadSCons-57d09cd12f950ba938ab0164f3b68ed937353318.zip
SCons-57d09cd12f950ba938ab0164f3b68ed937353318.tar.gz
SCons-57d09cd12f950ba938ab0164f3b68ed937353318.tar.bz2
updated vc and tests to check the msvc cl binary
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index 53bd397..e5c9aaf 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/engine/SCons/Tool/MSCommon/vc.py
@@ -43,6 +43,7 @@ import platform
from string import digits as string_digits
import SCons.Warnings
+from SCons.Tool import find_program_path
from . import common
@@ -357,9 +358,13 @@ def get_installed_vcs():
for ver in _VCVER:
debug('trying to find VC %s' % ver)
try:
- if find_vc_pdir(ver):
+ VC_DIR = find_vc_pdir(ver)
+ if VC_DIR:
debug('found VC %s' % ver)
- installed_versions.append(ver)
+ if os.path.exists(os.path.join(VC_DIR, r'bin\cl.exe')):
+ installed_versions.append(ver)
+ else:
+ debug('find_vc_pdir no cl.exe found %s' % ver)
else:
debug('find_vc_pdir return None for ver %s' % ver)
except VisualCException as e:
@@ -565,6 +570,11 @@ def msvc_setup_env(env):
for k, v in d.items():
debug('vc.py:msvc_setup_env() env:%s -> %s'%(k,v))
env.PrependENVPath(k, v, delete_existing=True)
+
+ msvc_cl = find_program_path(env, 'cl')
+ if not msvc_cl:
+ SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning,
+ "Could not find MSVC compiler 'cl.exe', it may need to be installed separately with Visual Studio")
def msvc_exists(version=None):
vcs = cached_get_installed_vcs()