The script to automatically build and run Fortran code in gfortran
environment
In Windows, the user should assign the installed location of gfortran
and cmake
: open build_run.bat
and fill in the following variables.
Name | Description | Example |
---|---|---|
mingw_bin_dir |
The path of the folder which contains gfortran.exe |
...\mingw64\bin |
cmake_bin_dir |
The path of the folder which contains cmake.exe |
...\cmake-3.31.0-rc3-windows-x86_64\bin |
CMake
is used to automatically analyze dependencies.
Note
System dependent information
The following instructions are only based on Windows, but this program can also run in other systems.
In Ubuntu, replace <script>.bat
to bash <script>.sh
; others are all the same.
To build and run Fortran program, run the following command with an optional folder
argument.
Windows:
build_run.bat [folder]
Arguments:
Name | Description | Required? |
---|---|---|
folder |
The root directory of the Fortran program to build and run. | Optional default: the current directory |