@@ -21,6 +21,8 @@ module fpm_installer
21
21
character (len= :), allocatable :: bindir
22
22
! > Library directory relative to the installation prefix
23
23
character (len= :), allocatable :: libdir
24
+ ! > Test program directory relative to the installation prefix
25
+ character (len= :), allocatable :: testdir
24
26
! > Include directory relative to the installation prefix
25
27
character (len= :), allocatable :: includedir
26
28
! > Output unit for informative printout
@@ -53,6 +55,9 @@ module fpm_installer
53
55
54
56
! > Default name of the library subdirectory
55
57
character (len=* ), parameter :: default_libdir = " lib"
58
+
59
+ ! > Default name of the test subdirectory
60
+ character (len=* ), parameter :: default_testdir = " test"
56
61
57
62
! > Default name of the include subdirectory
58
63
character (len=* ), parameter :: default_includedir = " include"
@@ -78,7 +83,7 @@ module fpm_installer
78
83
contains
79
84
80
85
! > Create a new instance of an installer
81
- subroutine new_installer (self , prefix , bindir , libdir , includedir , verbosity , &
86
+ subroutine new_installer (self , prefix , bindir , libdir , includedir , testdir , verbosity , &
82
87
copy , move )
83
88
! > Instance of the installer
84
89
type (installer_t), intent (out ) :: self
@@ -90,6 +95,8 @@ subroutine new_installer(self, prefix, bindir, libdir, includedir, verbosity, &
90
95
character (len=* ), intent (in ), optional :: libdir
91
96
! > Include directory relative to the installation prefix
92
97
character (len=* ), intent (in ), optional :: includedir
98
+ ! > Test directory relative to the installation prefix
99
+ character (len=* ), intent (in ), optional :: testdir
93
100
! > Verbosity of the installer
94
101
integer , intent (in ), optional :: verbosity
95
102
! > Copy command
@@ -125,6 +132,12 @@ subroutine new_installer(self, prefix, bindir, libdir, includedir, verbosity, &
125
132
else
126
133
self% includedir = default_includedir
127
134
end if
135
+
136
+ if (present (testdir)) then
137
+ self% testdir = testdir
138
+ else
139
+ self% testdir = default_testdir
140
+ end if
128
141
129
142
if (present (prefix)) then
130
143
self% prefix = prefix
0 commit comments