diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-04-12 01:21:00 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-04-27 23:19:01 -0400 |
commit | 50f23815658bb704f454c83edfe2cc7e4e419628 (patch) | |
tree | 63ae0d49bf4b85b83eb718366c16e95ae8ee3736 /mesonbuild/environment.py | |
parent | 3a75bb5259abbcae820b47f5f4633c564411893b (diff) | |
download | meson-50f23815658bb704f454c83edfe2cc7e4e419628.zip meson-50f23815658bb704f454c83edfe2cc7e4e419628.tar.gz meson-50f23815658bb704f454c83edfe2cc7e4e419628.tar.bz2 |
enable Windows Intel compiler
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index ff24795..bf2cce9 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -779,9 +779,9 @@ class Environment: return cls(compiler, version, is_cross, exe_wrap, target) if 'PGI Compilers' in out: - if mesonlib.for_darwin(want_cross, self): + if mesonlib.for_darwin(is_cross, self): compiler_type = CompilerType.PGI_OSX - elif mesonlib.for_windows(want_cross, self): + elif mesonlib.for_windows(is_cross, self): compiler_type = CompilerType.PGI_WIN else: compiler_type = CompilerType.PGI_STANDARD @@ -864,6 +864,13 @@ class Environment: popen_exceptions[' '.join(compiler + [arg])] = e continue + if mesonlib.for_windows(is_cross, self): + if 'ifort' in compiler[0]: + # https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-alphabetical-list-of-compiler-options + # https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-logo + # most consistent way for ICL is to just let compiler error and tell version + out = err + version = search_version(out) full_version = out.split('\n', 1)[0] @@ -894,16 +901,16 @@ class Environment: version = search_version(err) return SunFortranCompiler(compiler, version, is_cross, exe_wrap, full_version=full_version) - if 'ifort (IFORT)' in out: + if 'ifort (IFORT)' in out or out.startswith('Intel(R) Visual Fortran'): return IntelFortranCompiler(compiler, version, is_cross, exe_wrap, full_version=full_version) if 'PathScale EKOPath(tm)' in err: return PathScaleFortranCompiler(compiler, version, is_cross, exe_wrap, full_version=full_version) if 'PGI Compilers' in out: - if mesonlib.for_darwin(want_cross, self): + if mesonlib.for_darwin(is_cross, self): compiler_type = CompilerType.PGI_OSX - elif mesonlib.for_windows(want_cross, self): + elif mesonlib.for_windows(is_cross, self): compiler_type = CompilerType.PGI_WIN else: compiler_type = CompilerType.PGI_STANDARD |