Topic: Compile function needed

We need a facility to compile just the current source file.
This is so that, after working on one source file, one can compile it to check for errors before  move on to another source file that needs further work.

It is also sometimes needed when an existing program needs debugging and just one source file needs to be re-compiled with the debug option set.                                                                                                                                                                                                                           

At present, when I want to compile just one source file, I have to,
- make some simple change to it. like adding a space at the end of a line,
- SAVE the file, and
- BUILD the PROJECT.

This works because SF keeps track of which files have been edited and only re-compiles these, but it then re-links and loads the whole project, which is often unnecessary.

Hence the need for a facility to compile just one file and not rebuild the project.

Building the project should still sense which files have changed, exactly as now.
---
John

Re: Compile function needed

John,

The process can be time consuming, and I think a "compile" option makes sense.  However, there is the issue of Fortran module dependencies to consider.  Due to the nature of Fortran 90 and later standards, compilation of even a single file can fail if the modules it depends on are not yet built.  Therefore, to compile a single file, any files containing modules on which it depends must be built first.  A single-file compile option, even just for checking syntax, would need the dependent modules compiled first.  This requirement can be overcome with some ease, but I just wanted to explain the issue involved.  While one might want to compile just a single file, it may be necessary to trigger recompilation of all files on which the file of interest depends.  The process would still require a call out to the makefile. 

I'll have a look into the best way to implement a single-file compile option.  I agree that it would be useful.

Jeff Armstrong
Approximatrix, LLC