Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27975 Discussions

Any way to assign the output dir for intermediate files of fpp preprocessor


It has been noticed earily that currently ifort would inevitably generates and keep intermediate files (e.g. ".i"s and ".i90"s) when using -fpp and -syntax-only together: ifort does not remove temps when using -syntax-only .


Is there a way to locate those ".i90" to a specific path to keep the project directory clean?

Labels (1)
0 Kudos
2 Replies
Black Belt

If you are using MS Visual Studio, you can add a post build procedure (e.g. batch file). If using make files, you can do something similar.

The file types (.i90, .asm) are distinguishable from the traditional (.f90, .f) file type.

As you have noticed, these files are placed in the project folder.

If you place your source files in a different folder from the project (e.g. "sources"), then the project folder(s) contain the ...vfproj file(s) plus any generated .fpp/asm generated files. This might be preferrable to co-mingling the .f90 files with the .i90 files ymmv.


Jim Dempsey

0 Kudos

This problem shows up as I am currently using Visual Studio Code to maintian my Fortran codes, and vscode use the compiler with  -syntax-only to implements the linter for Fortran. (So I don't know if VS is in the same case.) It’s quite distracting that i90 files pop up even just for a simple look at the code.

Thanks for the detailed advices. Since there doesn't seem to be a built-in solution for this issue at the moment, I'll have VSCode hide the i90s and use some batch script to clean them up.

0 Kudos