diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-30 16:06:37 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-13 11:22:31 -0700 |
commit | b557d00f90452f710a6f797fbdb84b462f7bcf30 (patch) | |
tree | c142911c1f977f2401a923c81e5137697b329f55 | |
parent | 7e4b2f57583eb8e42335faa66ccd9bb5a8de333a (diff) | |
download | meson-b557d00f90452f710a6f797fbdb84b462f7bcf30.zip meson-b557d00f90452f710a6f797fbdb84b462f7bcf30.tar.gz meson-b557d00f90452f710a6f797fbdb84b462f7bcf30.tar.bz2 |
environment: search for icl and ifort before cl and goftran
Intel helpfully provides a cl.exe that is indistinguishable from
Microsoft's cl.exe in output, but has the same behavior as icl.exe.
Since icl and ifort will only be present in your path if you've started
an Intel command prompt search for that first.
-rw-r--r-- | mesonbuild/environment.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 4be412f..9620639 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -460,12 +460,18 @@ class Environment: # List of potential compilers. if mesonlib.is_windows(): # Intel C and C++ compiler is icl on Windows, but icc and icpc elsewhere. - self.default_c = ['cl', 'cc', 'gcc', 'clang', 'clang-cl', 'pgcc', 'icl'] + # Search for icl before cl, since Intel "helpfully" provides a + # cl.exe that returns *exactly the same thing* that microsofts + # cl.exe does, and if icl is present, it's almost certainly what + # you want. + self.default_c = ['icl', 'cl', 'cc', 'gcc', 'clang', 'clang-cl', 'pgcc'] # There is currently no pgc++ for Windows, only for Mac and Linux. - self.default_cpp = ['cl', 'c++', 'g++', 'clang++', 'clang-cl', 'icl'] + self.default_cpp = ['icl', 'cl', 'c++', 'g++', 'clang++', 'clang-cl'] + self.default_fortran = ['ifort', 'gfortran', 'flang', 'pgfortran', 'g95'] else: self.default_c = ['cc', 'gcc', 'clang', 'pgcc', 'icc'] self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++', 'icpc'] + self.default_fortran = ['gfortran', 'flang', 'pgfortran', 'ifort', 'g95'] if mesonlib.is_windows(): self.default_cs = ['csc', 'mcs'] else: @@ -473,7 +479,6 @@ class Environment: self.default_objc = ['cc'] self.default_objcpp = ['c++'] self.default_d = ['ldc2', 'ldc', 'gdc', 'dmd'] - self.default_fortran = ['gfortran', 'flang', 'pgfortran', 'ifort', 'g95'] self.default_java = ['javac'] self.default_cuda = ['nvcc'] self.default_rust = ['rustc'] |