Skip to content

Commit 7734124

Browse files
authored
Merge pull request #693 from zoziha/fix_model
Fix show-model option
2 parents aec789f + 26dc01a commit 7734124

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/fpm_sources.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ subroutine add_sources_from_dir(sources,directory,scope,with_executables,recurse
9696
if (allocated(error)) return
9797

9898
dir_sources(i)%unit_scope = scope
99+
allocate(dir_sources(i)%link_libraries(0))
99100

100101
! Exclude executables unless specified otherwise
101102
exclude_source(i) = (dir_sources(i)%unit_type == FPM_UNIT_PROGRAM)

test/fpm_test/test_source_parsing.f90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,11 @@ subroutine test_csource(error)
643643
return
644644
end if
645645

646+
if (allocated(f_source%link_libraries)) then
647+
call test_failed(error,'Unexpected link_libraries - expecting unallocated')
648+
return
649+
end if
650+
646651
if (.not.('proto.h' .in. f_source%include_dependencies)) then
647652
call test_failed(error,'Missing file in include_dependencies')
648653
return

0 commit comments

Comments
 (0)