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.
# 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']
