@@ -35,6 +35,7 @@ module fpm_manifest_package
35
35
use fpm_error, only : error_t, fatal_error, syntax_error
36
36
use fpm_toml, only : toml_table, toml_array, toml_key, toml_stat, get_value, &
37
37
& len
38
+ use fpm_versioning, only : version_t, new_version
38
39
implicit none
39
40
private
40
41
@@ -47,6 +48,9 @@ module fpm_manifest_package
47
48
! > Name of the package
48
49
character (len= :), allocatable :: name
49
50
51
+ ! > Package version
52
+ type (version_t) :: version
53
+
50
54
! > Library meta data
51
55
type (library_t), allocatable :: library
52
56
@@ -87,6 +91,7 @@ subroutine new_package(self, table, error)
87
91
88
92
type (toml_table), pointer :: child, node
89
93
type (toml_array), pointer :: children
94
+ character (len= :), allocatable :: version
90
95
integer :: ii, nn, stat
91
96
92
97
call check(table, error)
@@ -98,6 +103,10 @@ subroutine new_package(self, table, error)
98
103
return
99
104
end if
100
105
106
+ call get_value(table, " version" , version, " 0" )
107
+ call new_version(self% version, version, error)
108
+ if (allocated (error)) return
109
+
101
110
call get_value(table, " dependencies" , child, requested= .false. )
102
111
if (associated (child)) then
103
112
call new_dependencies(self% dependency, child, error)
0 commit comments