diff options
Diffstat (limited to 'src/fpm_sources.f90')
-rw-r--r-- | src/fpm_sources.f90 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fpm_sources.f90 b/src/fpm_sources.f90 index af2870f..05b9bc1 100644 --- a/src/fpm_sources.f90 +++ b/src/fpm_sources.f90 @@ -6,7 +6,7 @@ module fpm_sources use fpm_error, only: error_t use fpm_model, only: srcfile_t, FPM_UNIT_PROGRAM -use fpm_filesystem, only: basename, canon_path, dirname, join_path, list_files +use fpm_filesystem, only: basename, canon_path, dirname, join_path, list_files, is_hidden_file use fpm_strings, only: lower, str_ends_with, string_t, operator(.in.) use fpm_source_parsing, only: parse_f_source, parse_c_source use fpm_manifest_executable, only: executable_config_t @@ -81,9 +81,10 @@ subroutine add_sources_from_dir(sources,directory,scope,with_executables,recurse allocate(existing_src_files(0)) end if - is_source = [(.not.(canon_path(file_names(i)%s) .in. existing_src_files) .and. & - (str_ends_with(lower(file_names(i)%s), fortran_suffixes) .or. & - str_ends_with(lower(file_names(i)%s),[".c",".h"]) ),i=1,size(file_names))] + is_source = [(.not.(is_hidden_file(basename(file_names(i)%s))) .and. & + .not.(canon_path(file_names(i)%s) .in. existing_src_files) .and. & + (str_ends_with(lower(file_names(i)%s), fortran_suffixes) .or. & + str_ends_with(lower(file_names(i)%s),[".c",".h"]) ),i=1,size(file_names))] src_file_names = pack(file_names,is_source) allocate(dir_sources(size(src_file_names))) |