Fortran
CLion supports Fortran via the plugin compatible with all IntelliJ-based IDEs. This plugin includes smart editor, navigation actions, code analysis and debugger for FORTRAN 77/90/95/2003/2008 source code. Application support is provided via CMake.
Start a Fortran project in CLion
Install the Fortran plugin either directly from the Plugin Repository page or from CLion: go to , switch to Marketplace and type Fortran in the search field, then click Install in the plugin description dialog.
Create a new Fortran executable project ( ) or open an existing CMake-based Fortran project.
Make sure to instruct CMake on where to find the Fortran compiler. You can do so by setting the FC environment variable or set CMAKE_Fortran_COMPILER in CMakeLists.txt (provide the full path to the compiler executable or only the compiler name in case the PATH variable is set accordingly).
Working with Fortran code
In addition to parsing and highlighting your Fortran code, the plugin provides other code insight features, for example:
Code editing: Add Line Comment Ctrl+/, Code folding, Brace matching, and Formatting (currently available only for free source form files)
Navigation actions: Go to Definition, Structure view, and Find Usages
Code analysis: a set of useful code inspections to catch potential errors
Running and debugging
To run and debug Fortran code, create a CMake Application configuration (go to , press and select CMake Application).
In the toolchain settings (switch to GDB in the Debugger field.
),Run or Debug the newly created configuration: