Skip to content

Commit

Permalink
Fix compilation with NAG (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk authored Sep 19, 2022
1 parent e2a8218 commit 1a8a96b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ copyright = "2020 fpm contributors"
[dependencies]
[dependencies.toml-f]
git = "https://github.com/toml-f/toml-f"
rev = "2f5eaba864ff630ba0c3791126a3f811b6e437f3"
rev = "e49f5523e4ee67db6628618864504448fb8c8939"

[dependencies.M_CLI2]
git = "https://github.com/urbanjost/M_CLI2.git"
Expand Down
5 changes: 2 additions & 3 deletions src/fpm_command_line.f90
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ subroutine get_command_line_settings(cmd_settings)
c_compiler = sget('c-compiler')
cxx_compiler = sget('cxx-compiler')
archiver = sget('archiver')
allocate(install_settings)
install_settings = fpm_install_settings(&
allocate(install_settings, source=fpm_install_settings(&
list=lget('list'), &
profile=val_profile,&
prune=.not.lget('no-prune'), &
Expand All @@ -497,7 +496,7 @@ subroutine get_command_line_settings(cmd_settings)
cxxflag=val_cxxflag, &
ldflag=val_ldflag, &
no_rebuild=lget('no-rebuild'), &
verbose=lget('verbose'))
verbose=lget('verbose')))
call get_char_arg(install_settings%prefix, 'prefix')
call get_char_arg(install_settings%libdir, 'libdir')
call get_char_arg(install_settings%bindir, 'bindir')
Expand Down
2 changes: 1 addition & 1 deletion src/fpm_compiler.f90
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ module fpm_compiler
character(*), parameter :: &
flag_nag_coarray = " -coarray=single", &
flag_nag_pic = " -PIC", &
flag_nag_check = " -C=all", &
flag_nag_check = " -C", &
flag_nag_debug = " -g -O0", &
flag_nag_opt = " -O4", &
flag_nag_backtrace = " -gline"
Expand Down
5 changes: 4 additions & 1 deletion src/fpm_sources.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ subroutine add_sources_from_dir(sources,directory,scope,with_executables,recurse

integer :: i
logical, allocatable :: is_source(:), exclude_source(:)
logical :: recurse_
type(string_t), allocatable :: file_names(:)
type(string_t), allocatable :: src_file_names(:)
type(string_t), allocatable :: existing_src_files(:)
type(srcfile_t), allocatable :: dir_sources(:)

recurse_ = .true.
if (present(recurse)) recurse_ = recurse
! Scan directory for sources
call list_files(directory, file_names,recurse=merge(recurse,.true.,present(recurse)))
call list_files(directory, file_names,recurse=recurse_)

if (allocated(sources)) then
allocate(existing_src_files(size(sources)))
Expand Down

0 comments on commit 1a8a96b

Please sign in to comment.