Using Configuration Files

Configuration files are automatically processed every time you run the compiler. You can insert any valid command-line options into the configuration file. The compiler processes options in the configuration file in the order in which they appear, followed by the command-line options that you specify when you invoke the compiler.

Note

Options in the configuration file are executed every time you run the compiler. If you have varying option requirements for different projects, use response files.

By default, a configuration file named ifort.cfg is used. This file resides in the same directory where the compiler executable resides. However, if you want the compiler to use another configuration file in a different location, you can use the IFORTCFG environment variable to assign the directory and file name for the configuration file.

Sample Configuration Files

Examples that follow illustrate sample configuration files. The pound (#) character indicates that the rest of the line is a comment.
 

Linux* and Mac OS* Example:

## Example ifort.cfg file
##
## Define preprocessor macro MY_PROJECT.
-DMY_PROJECT
##
## Set extended-length source lines.
-extend_source
##
## Set maximum floating-point significand precision.
-pc80
##

 

Windows* Example:

## Sample ifort.cfg file

## Define preprocessor macro MY_PROJECT

/DMY_PROJECT

 
## Set extended-length source lines.
/extend_source
##
## Set maximum floating-point significand precision.
/Qpc80
##

 

## Additional directories to be searched for include

## files, before the default.

 

/Ic:\project\include

 

## Use the static, multithreaded run-time library.

 

/MT