Configuration files and response files are similar in that both eliminate the need to enter the same commands again and again. (Response files are also known as indirect command files.) The following describes each type of file.
You can use a configuration (.cfg) file to:
Decrease the time you spend entering command-line options
Ensure consistency of often used commands
You can insert any valid command-line options into a 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 placed in the configuration file will be included each 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 other configuration file.
An example configuration file is shown below. The pound (#) character indicates that the rest of the line is a comment.
## 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
##
You can use response files (also known as indirect command files) to:
Specify options used during particular compilations for particular projects
Save this information in individual files
Response files are invoked as an option on the command line. Options specified in a response file are inserted in the command line at the point where the response file is invoked.
Like configuration files, response files are used to:
Decrease the time you spend entering command-line options
Ensure consistency of often used commands
Options in a configuration file are executed every time you run the compiler. In contrast, you use response files to maintain options for individual projects.
You can place any number of options or file names on a line in the indirect command file or response file. Several files can be referenced in the same command line.
The syntax for using response files is:
ifort @responsefile [@responsefile2...]
Note
An "at" sign (@) must precede the name of the response file on the command line.