abi = abi.lower()
# valid_abis maps input name to canonical name
if is_win32:
- valid_abis = {'ia32':'ia32', 'x86':'ia32',
- 'ia64':'ia64'}
+ valid_abis = {'ia32' : 'ia32',
+ 'x86' : 'ia32',
+ 'ia64' : 'ia64',
+ 'em64t' : 'ia32e',
+ 'amd64' : 'ia32e'}
if is_linux:
- valid_abis = {'ia32':'ia32', 'x86':'ia32',
- 'x86_64':'x86_64', 'em64t':'x86_64', 'amd64':'x86_64'}
+ valid_abis = {'ia32' : 'ia32',
+ 'x86' : 'ia32',
+ 'x86_64' : 'x86_64',
+ 'em64t' : 'x86_64',
+ 'amd64' : 'x86_64'}
try:
abi = valid_abis[abi]
except KeyError:
"""
Return a value from the Intel compiler registry tree. (Win32 only)
"""
-
# Open the key:
K = 'Software\\Intel\\Compilers\\C++\\' + version + '\\'+abi.upper()
try:
k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K)
except SCons.Util.RegError:
raise MissingRegistryError, \
- "%s was not found in the registry, for Intel compiler version %s"%(K, version)
+ "%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi)
# Get the value:
try:
# than uninstalling properly), so the registry values
# are still there.
ok = False
- for try_abi in ('IA32', 'IA64'):
+ for try_abi in ('IA32', 'IA32e', 'IA64'):
try:
d = get_intel_registry_value('ProductDir', subkey, try_abi)
except MissingRegistryError:
The compiler will be in <top>/bin/icl.exe (icc on linux),
the include dir is <top>/include, etc.
"""
-
if is_win32:
if not SCons.Util.can_read_reg:
raise NoRegistryModuleError, "No Windows registry module was found"
top = get_intel_registry_value('ProductDir', version, abi)
-
if not os.path.exists(os.path.join(top, "Bin", "icl.exe")):
raise MissingDirError, \
"Can't find Intel compiler in %s"%(top)
SCons.Tool.msvc.generate(env)
elif is_linux:
SCons.Tool.gcc.generate(env)
-
+
# if version is unspecified, use latest
vlist = get_all_compiler_versions()
if not version:
if not topdir:
# Normally this is an error, but it might not be if the compiler is
# on $PATH and the user is importing their env.
+ class ICLTopDirWarning(SCons.Warnings.Warning):
+ pass
if is_linux and not env.Detect('icc') or \
is_win32 and not env.Detect('icl'):
- class ICLTopDirWarning(SCons.Warnings.Warning):
- pass
+
SCons.Warnings.enableWarningClass(ICLTopDirWarning)
SCons.Warnings.warn(ICLTopDirWarning,
- "Can't find Intel compiler top dir for version='%s', abi='%s'"%
+ "Failed to find Intel compiler for version='%s', abi='%s'"%
(str(version), str(abi)))
+ else:
+ # should be cleaned up to say what this other version is
+ # since in this case we have some other Intel compiler installed
+ SCons.Warnings.enableWarningClass(ICLTopDirWarning)
+ SCons.Warnings.warn(ICLTopDirWarning,
+ "Can't find Intel compiler top dir for version='%s', abi='%s'"%
+ (str(version), str(abi)))
if topdir:
if verbose:
'zip',
]
-# Intel no top dir warning, 32 bit version.
-intel_no_top_dir_32_warning = """
-scons: warning: Can't find Intel compiler top dir for version='None', abi='ia32'
+# Intel no compiler warning..
+intel_no_compiler_fmt = """
+scons: warning: Failed to find Intel compiler for version='None', abi='%s'
File "SConstruct", line 1, in ?
"""
-# Intel no top dir warning, 64 bit version.
-intel_no_top_dir_64_warning = """
-scons: warning: Can't find Intel compiler top dir for version='None', abi='x86_64'
+intel_no_compiler_32_warning = intel_no_compiler_fmt % 'ia32'
+intel_no_compiler_64_warning = intel_no_compiler_fmt % 'x86_64'
+
+# Intel no top dir warning.
+intel_no_top_dir_fmt = """
+scons: warning: Can't find Intel compiler top dir for version='None', abi='%s'
File "SConstruct", line 1, in ?
"""
+intel_no_top_dir_32_warning = intel_no_top_dir_fmt % 'ia32'
+intel_no_top_dir_64_warning = intel_no_top_dir_fmt % 'x86_64'
+
# Intel no license directory warning
intel_license_warning = """
scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (), the registry () and the default path (C:\Program Files\Common Files\Intel\Licenses). Using the default path as a last resort.
intel_warnings = [
intel_license_warning,
+ intel_no_compiler_32_warning,
+ intel_no_compiler_32_warning + intel_license_warning,
+ intel_no_compiler_64_warning,
+ intel_no_compiler_64_warning + intel_license_warning,
intel_no_top_dir_32_warning,
intel_no_top_dir_32_warning + intel_license_warning,
intel_no_top_dir_64_warning,