Skip to content

Commit 83cdb72

Browse files
committed
Merge remote-tracking branch 'upstream/master' into auto-discovery
2 parents d09aa6a + 0c35749 commit 83cdb72

File tree

4 files changed

+813
-1
lines changed

4 files changed

+813
-1
lines changed

fpm/src/fpm/manifest/package.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module fpm_manifest_package
3636
use fpm_error, only : error_t, fatal_error, syntax_error
3737
use fpm_toml, only : toml_table, toml_array, toml_key, toml_stat, get_value, &
3838
& len
39+
use fpm_versioning, only : version_t, new_version
3940
implicit none
4041
private
4142

@@ -51,6 +52,9 @@ module fpm_manifest_package
5152
!> Build configuration data
5253
type(build_config_t) :: build_config
5354

55+
!> Package version
56+
type(version_t) :: version
57+
5458
!> Library meta data
5559
type(library_t), allocatable :: library
5660

@@ -91,6 +95,7 @@ subroutine new_package(self, table, error)
9195

9296
type(toml_table), pointer :: child, node
9397
type(toml_array), pointer :: children
98+
character(len=:), allocatable :: version
9499
integer :: ii, nn, stat
95100

96101
call check(table, error)
@@ -108,6 +113,12 @@ subroutine new_package(self, table, error)
108113
return
109114
end if
110115
call new_build_config(self%build_config, child, error)
116+
117+
if (allocated(error)) return
118+
119+
call get_value(table, "version", version, "0")
120+
call new_version(self%version, version, error)
121+
111122
if (allocated(error)) return
112123

113124
call get_value(table, "dependencies", child, requested=.false.)

0 commit comments

Comments
 (0)