aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-08-07 11:42:48 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-08-14 13:13:23 -0700
commitb5c76a6c02c235d971069965b1f75765c09bdf5f (patch)
treebf841a88f0de59b2c4416a75b4db64cd87dc7621
parent29f351c05a828dbc943ae2a80899e05f8aed2d2f (diff)
downloadmeson-b5c76a6c02c235d971069965b1f75765c09bdf5f.zip
meson-b5c76a6c02c235d971069965b1f75765c09bdf5f.tar.gz
meson-b5c76a6c02c235d971069965b1f75765c09bdf5f.tar.bz2
compilers/fortran: fix ifort (linux, mac) dependency generation
Ifort can generate dependency information (.d files), it just does it differently than GNU compilers do. This also fixes a bug caused by adding the dependency generation commands to the GNULike class later in this series.
-rw-r--r--mesonbuild/compilers/fortran.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index c10e2ca..3eb8f2e 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -11,9 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
+from pathlib import Path
from typing import List
import subprocess, os
-from pathlib import Path
+import typing
from .compilers import (
CompilerType,
@@ -256,6 +258,10 @@ class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler):
def language_stdlib_only_link_flags(self):
return ['-lifcore', '-limf']
+ def get_dependency_gen_args(self, outtarget: str, outfile: str) -> typing.List[str]:
+ return ['-gen-dep=' + outtarget, '-gen-depformat=make']
+
+
class IntelClFortranCompiler(IntelVisualStudioLikeCompiler, FortranCompiler):
file_suffixes = ['f90', 'f', 'for', 'ftn', 'fpp']