Skip to content

Commit d09aa6a

Browse files
committed
Update: package%build_config not allocatable
1 parent fc8cab5 commit d09aa6a

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

fpm/src/fpm/manifest/package.f90

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module fpm_manifest_package
4949
character(len=:), allocatable :: name
5050

5151
!> Build configuration data
52-
type(build_config_t), allocatable :: build_config
52+
type(build_config_t) :: build_config
5353

5454
!> Library meta data
5555
type(library_t), allocatable :: library
@@ -107,7 +107,6 @@ subroutine new_package(self, table, error)
107107
call fatal_error(error, "Type mismatch for build entry, must be a table")
108108
return
109109
end if
110-
allocate(self%build_config)
111110
call new_build_config(self%build_config, child, error)
112111
if (allocated(error)) return
113112

@@ -242,9 +241,7 @@ subroutine info(self, unit, verbosity)
242241
write(unit, fmt) "- name", self%name
243242
end if
244243

245-
if (allocated(self%build_config)) then
246-
call self%build_config%info(unit, pr - 1)
247-
end if
244+
call self%build_config%info(unit, pr - 1)
248245

249246
if (allocated(self%library)) then
250247
write(unit, fmt) "- target", "archive"

fpm/test/fpm_test/test_manifest.f90

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ subroutine test_valid_manifest(error)
101101
return
102102
end if
103103

104-
if (.not.allocated(package%build_config)) then
105-
call test_failed(error, "build is not present in package data")
106-
return
107-
end if
108-
109104
if (.not.allocated(package%library)) then
110105
call test_failed(error, "library is not present in package data")
111106
return
@@ -482,11 +477,6 @@ subroutine test_build_config_valid(error)
482477

483478
if (allocated(error)) return
484479

485-
if (.not.allocated(package%build_config)) then
486-
call test_failed(error, "build is not present in package data")
487-
return
488-
end if
489-
490480
if (package%build_config%auto_executables) then
491481
call test_failed(error, "Wong value of 'auto-executables' read, expecting .false.")
492482
return
@@ -523,11 +513,6 @@ subroutine test_build_config_empty(error)
523513

524514
if (allocated(error)) return
525515

526-
if (.not.allocated(package%build_config)) then
527-
call test_failed(error, "build is not present in package data")
528-
return
529-
end if
530-
531516
if (.not.package%build_config%auto_executables) then
532517
call test_failed(error, "Wong default value of 'auto-executables' read, expecting .true.")
533518
return

0 commit comments

Comments
 (0)