Skip to content

Commit

Permalink
Merge pull request #693 from zoziha/fix_model
Browse files Browse the repository at this point in the history
Fix show-model option
  • Loading branch information
LKedward authored May 28, 2022
2 parents aec789f + 26dc01a commit 7734124
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fpm_sources.f90
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ subroutine add_sources_from_dir(sources,directory,scope,with_executables,recurse
if (allocated(error)) return

dir_sources(i)%unit_scope = scope
allocate(dir_sources(i)%link_libraries(0))

! Exclude executables unless specified otherwise
exclude_source(i) = (dir_sources(i)%unit_type == FPM_UNIT_PROGRAM)
Expand Down
5 changes: 5 additions & 0 deletions test/fpm_test/test_source_parsing.f90
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,11 @@ subroutine test_csource(error)
return
end if

if (allocated(f_source%link_libraries)) then
call test_failed(error,'Unexpected link_libraries - expecting unallocated')
return
end if

if (.not.('proto.h' .in. f_source%include_dependencies)) then
call test_failed(error,'Missing file in include_dependencies')
return
Expand Down

0 comments on commit 7734124

Please sign in to comment.