From 32401f1fa1ed9d42e6a59d988a03fdf6f3fc9716 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Mon, 10 Jan 2022 08:13:17 +0100 Subject: Update module output directory command for flang-new/f18 (#645) --- src/fpm_compiler.f90 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/fpm_compiler.f90 b/src/fpm_compiler.f90 index bccff74..98a3650 100644 --- a/src/fpm_compiler.f90 +++ b/src/fpm_compiler.f90 @@ -61,6 +61,8 @@ enum, bind(C) id_nvhpc, & id_nag, & id_flang, & + id_flang_new, & + id_f18, & id_ibmxl, & id_cray, & id_lahey, & @@ -380,7 +382,8 @@ function get_include_flag(self, path) result(flags) case default flags = "-I "//path - case(id_caf, id_gcc, id_f95, id_cray, id_nvhpc, id_pgi, id_flang, & + case(id_caf, id_gcc, id_f95, id_cray, id_nvhpc, id_pgi, & + & id_flang, id_flang_new, id_f18, & & id_intel_classic_nix, id_intel_classic_mac, & & id_intel_llvm_nix, id_lahey, id_nag, id_ibmxl, & & id_lfortran) @@ -407,6 +410,9 @@ function get_module_flag(self, path) result(flags) case(id_nvhpc, id_pgi, id_flang) flags = "-module "//path + case(id_flang_new, id_f18) + flags = "-module-dir "//path + case(id_intel_classic_nix, id_intel_classic_mac, & & id_intel_llvm_nix) flags = "-module "//path @@ -443,7 +449,7 @@ subroutine get_default_c_compiler(f_compiler, c_compiler) case(id_intel_llvm_nix,id_intel_llvm_windows) c_compiler = 'icx' - case(id_flang) + case(id_flang, id_flang_new, id_f18) c_compiler='clang' case(id_ibmxl) @@ -558,6 +564,16 @@ function get_id(compiler) result(id) return end if + if (check_compiler(compiler, "flang-new")) then + id = id_flang_new + return + end if + + if (check_compiler(compiler, "f18")) then + id = id_f18 + return + end if + if (check_compiler(compiler, "flang")) then id = id_flang return -- cgit v1.2.3