Skip to content

Commit cfb0a51

Browse files
committed
Update: source parsing to skip pre-processor lines
Avoids misidentifying pure module sources as non-module (subprogram) sources due to presence of code outside of modules.
1 parent e08b64a commit cfb0a51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fpm_source_parsing.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ function parse_f_source(f_filename,error) result(f_source)
113113
inside_module = .false.
114114
file_loop: do i=1,size(file_lines_lower)
115115

116-
! Skip comment lines
116+
! Skip comment lines and preprocessor directives
117117
if (index(file_lines_lower(i)%s,'!') == 1 .or. &
118+
index(file_lines_lower(i)%s,'#') == 1 .or. &
118119
len_trim(file_lines_lower(i)%s) < 1) then
119120
cycle
120121
end if

0 commit comments

Comments
 (0)