- Fix use of the --implicit-cache option with timestamp signatures.
+ - If Visual Studio is installed, assume the C/C++ compiler, the linker
+ and the MIDL compiler that comes with it are available, too.
+
From sam th:
- Allow SConf.CheckLib() to search a list of libraries, like the
import SCons.Defaults
import SCons.Scanner.IDL
import SCons.Util
+import SCons.Tool.msvs
def midl_emitter(target, source, env):
"""Produces a list of outputs from the MIDL compiler"""
env['BUILDERS']['TypeLibrary'] = midl_builder
def exists(env):
- return env.Detect('midl')
+ if SCons.Tool.msvs.is_msvs_installed():
+ # there's at least one version of MSVS installed, which comes with midl:
+ return 1
+ else:
+ return env.Detect('midl')
+
+
pass
def exists(env):
- try:
- v = SCons.Tool.msvs.get_visualstudio_versions()
- except (SCons.Util.RegError, SCons.Errors.InternalError):
- pass
-
- if not v:
- return env.Detect('link')
- else:
+ if SCons.Tool.msvs.is_msvs_installed():
# there's at least one version of MSVS installed.
return 1
+ else:
+ return env.Detect('link')
env['BUILDERS']['PCH'] = pch_builder
def exists(env):
- try:
- v = SCons.Tool.msvs.get_visualstudio_versions()
- except (SCons.Util.RegError, SCons.Errors.InternalError):
- pass
-
- if not v:
- return env.Detect('cl')
- else:
+ if SCons.Tool.msvs.is_msvs_installed():
# there's at least one version of MSVS installed.
return 1
+ else:
+ return env.Detect('cl')
+
return L
+def is_msvs_installed():
+ """
+ Check the registry for an installed visual studio.
+ """
+ try:
+ v = SCons.Tool.msvs.get_visualstudio_versions()
+ return v
+ except (SCons.Util.RegError, SCons.Errors.InternalError):
+ return 0
+
def get_msvs_install_dirs(version = None):
"""
Get installed locations for various msvc-related products, like the .NET SDK