You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Add missing file extensions to source file discovery
Added .f, .f90, and .F90 to the wanted() function in cons script so that
Fortran 77 and Fortran 90 source files are properly discovered during build.
Previously, the file discovery function was missing these extensions, causing
F90 files to be ignored even though the compiler support was in place.
Updated documentation to clarify automatic file discovery.
Co-authored-by: klendathu2k <56083924+klendathu2k@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/fortran90-support.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,21 +44,26 @@ Both extensions are mapped to the `build::command::f90` builder in the cons syst
44
44
45
45
To use Fortran 90 in your project:
46
46
47
-
1. Create your Fortran 90 source files with `.f90` or `.F90` extensions
48
-
2.Add them to your Conscript file as you would other source files
47
+
1. Create your Fortran 90 source files with `.f90` or `.F90` extensions in your source directory
48
+
2.The cons build system will automatically discover these files when scanning the directory
49
49
3. The build system will automatically use the Fortran 90 compiler for these files
50
50
51
-
Example:
52
-
```perl
53
-
# In your Conscript file
54
-
my@src = qw(
55
-
mycode.cxx
56
-
myfortran.f
57
-
myfortran90.f90
58
-
);
51
+
**Note**: The build system uses the `find_sources` function to automatically discover source files. As of this update, the following Fortran file extensions are recognized:
52
+
-`.f` - Fortran 77 fixed-form
53
+
-`.F` - Fortran 77 fixed-form with preprocessing
54
+
-`.f90` - Fortran 90 free-form
55
+
-`.F90` - Fortran 90 free-form with preprocessing
59
56
60
-
Library($env, 'MyLibrary', @src);
57
+
Example directory structure:
61
58
```
59
+
MyPackage/
60
+
├── mycode.cxx
61
+
├── myfortran.f # Fortran 77
62
+
├── myfortran90.f90 # Fortran 90
63
+
└── preprocessed.F90 # Fortran 90 with preprocessing
64
+
```
65
+
66
+
The build system will automatically find all these files and compile them appropriately.
0 commit comments