aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_sources.f90
diff options
context:
space:
mode:
authorJohn S. Urban <urbanjost@comcast.net>2021-07-13 14:52:30 -0400
committerJohn S. Urban <urbanjost@comcast.net>2021-07-13 14:52:30 -0400
commitf8b02175b403dd66d7f15db4bbf0de0765541b7f (patch)
tree918f064f24fc0f133d8cec2927aafcb0a898b082 /src/fpm_sources.f90
parent5617e65751193afb3c88fbc6cb8a32822ff52ffa (diff)
downloadfpm-f8b02175b403dd66d7f15db4bbf0de0765541b7f.tar.gz
fpm-f8b02175b403dd66d7f15db4bbf0de0765541b7f.zip
initialize allocatable strings before using in a comparison
Diffstat (limited to 'src/fpm_sources.f90')
-rw-r--r--src/fpm_sources.f9013
1 files changed, 9 insertions, 4 deletions
diff --git a/src/fpm_sources.f90 b/src/fpm_sources.f90
index c781535..f349a0e 100644
--- a/src/fpm_sources.f90
+++ b/src/fpm_sources.f90
@@ -1,7 +1,7 @@
!># Discovery of sources
!>
-!> This module implements subroutines for building a list of
-!> `[[srcfile_t]]` objects by looking for source files in the filesystem.
+!> This module implements subroutines for building a list of
+!> `[[srcfile_t]]` objects by looking for source files in the filesystem.
!>
module fpm_sources
use fpm_error, only: error_t
@@ -158,7 +158,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
if (basename(sources(j)%file_name,suffix=.true.) == executables(i)%main .and.&
canon_path(dirname(sources(j)%file_name)) == &
canon_path(executables(i)%source_dir) ) then
-
+
sources(j)%exe_name = executables(i)%name
if (allocated(executables(i)%link)) then
sources(j)%link_libraries = executables(i)%link
@@ -176,7 +176,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
exe_source%link_libraries = executables(i)%link
end if
exe_source%unit_scope = scope
-
+
if (allocated(error)) return
if (.not.allocated(sources)) then
@@ -200,6 +200,11 @@ subroutine get_executable_source_dirs(exe_dirs,executables)
integer :: i, n
n = 0
+
+ do i=1,size(executables)
+ dirs_temp(i)%s=' '
+ enddo
+
do i=1,size(executables)
if (.not.(executables(i)%source_dir .in. dirs_temp)) then