1
1
! ># Discovery of sources
2
2
! >
3
- ! > This module implements subroutines for building a list of
4
- ! > `[[srcfile_t]]` objects by looking for source files in the filesystem.
3
+ ! > This module implements subroutines for building a list of
4
+ ! > `[[srcfile_t]]` objects by looking for source files in the filesystem.
5
5
! >
6
6
module fpm_sources
7
7
use fpm_error, only: error_t
@@ -158,7 +158,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
158
158
if (basename(sources(j)% file_name,suffix= .true. ) == executables(i)% main .and. &
159
159
canon_path(dirname(sources(j)% file_name)) == &
160
160
canon_path(executables(i)% source_dir) ) then
161
-
161
+
162
162
sources(j)% exe_name = executables(i)% name
163
163
if (allocated (executables(i)% link)) then
164
164
sources(j)% link_libraries = executables(i)% link
@@ -176,7 +176,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
176
176
exe_source% link_libraries = executables(i)% link
177
177
end if
178
178
exe_source% unit_scope = scope
179
-
179
+
180
180
if (allocated (error)) return
181
181
182
182
if (.not. allocated (sources)) then
@@ -200,6 +200,11 @@ subroutine get_executable_source_dirs(exe_dirs,executables)
200
200
integer :: i, n
201
201
202
202
n = 0
203
+
204
+ do i= 1 ,size (executables)
205
+ dirs_temp(i)% s= ' '
206
+ enddo
207
+
203
208
do i= 1 ,size (executables)
204
209
if (.not. (executables(i)% source_dir .in . dirs_temp)) then
205
210
0 commit comments