A compiler option (also known as a switch) is an optional string of one or more alphanumeric characters preceded by a dash (-) (Linux* and Mac OS*) or a forward slash ( / ) (Windows*).
Some options are on by default when you invoke the compiler.
Depending on your operating system, compiler options are typically specified in the following ways:
On the compiler command line
In the IDE, either Xcode (Mac OS*) or Microsoft Visual Studio* (Windows*)
Most compiler options perform their work at compile time, although a few apply to the generation of extra code used at run time.
For more information about compiler options, see the Compiler Options reference.
For information on the option mapping tool, which shows equivalent options in Windows* and Linux*, see the Option Mapping Tool.
For help, enter -help [category] (Linux and Mac OS) or /help [category] (Windows) on the command line, which displays brief information about all the command-line options or a specific category of compiler options.
The Compiler Options reference provides a complete description of each compiler option, including the -help option.
If there are enabling and disabling versions of options on the command line, or two versions of the same option, the last one takes precedence.
If you compile parts of your program by using multiple ifort commands, options that affect the execution of the program should be used consistently for all compilations, especially if data is shared or passed between procedures. For example:
The same data alignment needs to be used for data passed or shared by module definitions (such as user-defined structures) or common blocks. Use the same version of the -align (Linux and Mac OS) or /align (Windows) option for all compilations.
The program might contain INTEGER, LOGICAL, REAL, or COMPLEX declarations without a kind parameter or size specifier that is passed or shared by module definitions or common blocks. You must consistently use the options that control the size of such numeric data declarations.
You can override some options specified on the command line by using the OPTIONS statement in your Fortran source program. The options specified by the OPTIONS statement affect only the program unit where the statement occurs.