Silverfrost Forums

Welcome to our forums

Directory Mix

12 Jan 2017 2:31 #18694

To compile about 400 Fortran files of a project in 40 different subdirectories I have created a batch file say in directroy MAIN.

This batch file runs in directory MAIN and starts all compilations with e.g.:

: CALL COMP64 LibF\cpuTime.f90 :

COMP64 is a bacht file containing

ftn95 %1 /64 /debug /no_banner

This construct allows to change compile options for all files at once. All OBJ files will be created - as expected - in the correct subdirectories e.g. LibF. However, all MOD files will be created in directory MAIN.

How can I make sure to have as well the MOD files in their correct positions in the subdirectories? Any idea?

12 Jan 2017 5:12 #18695

You might consider using the command line option /MOD_PATH to direct the compiler to look in MAIN for mod files.

You can also set MOD_PATH as an environment variable.

13 Jan 2017 8:13 #18696

The environment variable MOD_PATH is (probably) defined during FTN95 installation as

mod_path=C:\Program Files (x86)\Silverfrost\FTN95\include my file ftn95.cfg contains

/mod_path ..\Moduls to point to my global moduls. ?

13 Jan 2017 9:20 #18698

I guess the environment MOD_PATH could be a list so you could add to an existing MOD_PATH using semi-colon separators.

If you have created an ftn95.cfg then it can be modified. You can even have an extra ftn95.cfg in a local folder as well as the FTN95 folder. Both will be called upon.

You can use /MOD_PATH more than once on a command line.

Please login to reply.