@@ -18,6 +18,9 @@ module fpm_manifest_install
18
18
19
19
! > Install library with this project
20
20
logical :: library = .false.
21
+
22
+ ! > Install tests with this project
23
+ logical :: test = .false.
21
24
22
25
contains
23
26
@@ -51,6 +54,7 @@ subroutine new_install_config(self, table, error)
51
54
if (allocated (error)) return
52
55
53
56
call get_value(table, " library" , self% library, .false. )
57
+ call get_value(table, " test" , self% library, .false. )
54
58
55
59
end subroutine new_install_config
56
60
@@ -75,8 +79,8 @@ subroutine check(table, error)
75
79
case default
76
80
call syntax_error(error, " Key " // list(ikey)% key// " is not allowed in install table" )
77
81
exit
78
- case (" library" )
79
- continue
82
+ case (" library" , " test " )
83
+ continue
80
84
end select
81
85
end do
82
86
if (allocated (error)) return
@@ -107,8 +111,8 @@ subroutine info(self, unit, verbosity)
107
111
if (pr < 1 ) return
108
112
109
113
write (unit, fmt) " Install configuration"
110
- write (unit, fmt) " - library install" , &
111
- & trim (merge (" enabled " , " disabled" , self% library ))
114
+ write (unit, fmt) " - library install" , trim ( merge ( " enabled " , " disabled " , self % library))
115
+ write (unit, fmt) " - test install " , trim (merge (" enabled " , " disabled" , self% test ))
112
116
113
117
end subroutine info
114
118
@@ -121,6 +125,7 @@ logical function install_conf_same(this,that)
121
125
select type (other= >that)
122
126
type is (install_config_t)
123
127
if (this% library.neqv. other% library) return
128
+ if (this% test.neqv. other% test) return
124
129
class default
125
130
! Not the same type
126
131
return
@@ -144,6 +149,10 @@ subroutine dump_to_toml(self, table, error)
144
149
type (error_t), allocatable , intent (out ) :: error
145
150
146
151
call set_value(table, " library" , self% library, error, class_name)
152
+ if (allocated (error)) return
153
+
154
+ call set_value(table, " test" , self% test, error, class_name)
155
+ if (allocated (error)) return
147
156
148
157
end subroutine dump_to_toml
149
158
@@ -163,6 +172,8 @@ subroutine load_from_toml(self, table, error)
163
172
164
173
call get_value(table, " library" , self% library, error, class_name)
165
174
if (allocated (error)) return
175
+ call get_value(table, " library" , self% test, error, class_name)
176
+ if (allocated (error)) return
166
177
167
178
end subroutine load_from_toml
168
179
0 commit comments