diff options
author | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-02-24 13:58:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 13:58:35 +0000 |
commit | 8f27d57de4fbdc574f1f003ce90ba56fdc79cc06 (patch) | |
tree | b0e712ee9ae6b7213316d795bf43e1872956d6a6 | |
parent | 317a09a56cd83e5a45bd079d9203c3a253af5639 (diff) | |
parent | 0d23180362e4d115542a463a688900ef2adbca65 (diff) | |
download | fpm-8f27d57de4fbdc574f1f003ce90ba56fdc79cc06.tar.gz fpm-8f27d57de4fbdc574f1f003ce90ba56fdc79cc06.zip |
Merge pull request #372 from urbanjost/nounderscore
close #371
-rw-r--r-- | fpm/src/fpm.f90 | 3 | ||||
-rw-r--r-- | fpm/src/fpm_compiler.f90 | 27 |
2 files changed, 24 insertions, 6 deletions
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90 index 7609ee0..105fca7 100644 --- a/fpm/src/fpm.f90 +++ b/fpm/src/fpm.f90 @@ -69,6 +69,9 @@ subroutine build_model(model, settings, package, error) model%output_directory = join_path('build',basename(model%fortran_compiler)//'_'//settings%build_name) call add_compile_flag_defaults(settings%build_name, basename(model%fortran_compiler), model) + if(settings%verbose)then + write(*,*)'<INFO>COMPILER OPTIONS: ', model%fortran_compile_flags + endif model%link_flags = '' diff --git a/fpm/src/fpm_compiler.f90 b/fpm/src/fpm_compiler.f90 index ba840e6..99aa77d 100644 --- a/fpm/src/fpm_compiler.f90 +++ b/fpm/src/fpm_compiler.f90 @@ -12,7 +12,7 @@ type(fpm_model_t), intent(inout) :: model ! could just be a function to return a string instead of passing model ! but likely to change other components like matching C compiler -character(len=:),allocatable :: fflags ! optional flags that might be overridden by user +character(len=:),allocatable :: fflags ! optional flags that might be overridden by user character(len=:),allocatable :: modpath character(len=:),allocatable :: mandatory ! flags required for fpm to function properly; ! ie. add module path and module include directory as appropriate @@ -42,6 +42,24 @@ character(len=:),allocatable :: mandatory ! flags required for fpm to function p ! G95 ? ? -fmod= -I -fopenmp discontinued ! Open64 ? ? -module -I -mp discontinued ! Unisys ? ? ? ? ? discontinued +character(len=*),parameter :: names(*)=[ character(len=10) :: & +& 'caf', & +& 'gfortran', & +& 'f95', & +& 'nvfortran', & +& 'ifort', & +& 'ifx', & +& 'pgfortran', & +& 'pgf90', & +& 'pgf95', & +& 'flang', & +& 'lfc', & +& 'nagfor', & +& 'crayftn', & +& 'xlf90', & +& 'unknown'] +integer :: i + modpath=join_path(model%output_directory,model%package_name) fflags='' mandatory='' @@ -143,7 +161,6 @@ character(len=:),allocatable :: mandatory ! flags required for fpm to function p & -reentrancy threaded& & -nogen-interfaces& & -assume byterecl& - & -assume nounderscore& &' mandatory=' -module '//modpath//' -I '//modpath case('debug_ifort') @@ -219,10 +236,8 @@ character(len=:),allocatable :: mandatory ! flags required for fpm to function p case default fflags = ' ' mandatory=' -module '//modpath//' -I '//modpath - write(*,*)'<WARNING> unknown compiler (',compiler,')' - write(*,*)' and build name (',build_name,')' - write(*,*)' combination.' - write(*,*)' known compilers are gfortran, nvfortran, ifort' + write(*,'(*(a))')'<WARNING> unknown compiler (',compiler,') and build name (',build_name,') combination.' + write(*,'(a,*(T31,6(a:,", "),/))')' known compilers are ',(trim(names(i)),i=1,size(names)-1) end select model%fortran_compile_flags = fflags//' '//mandatory |