Configuration Files

You can decrease the time you spend entering command-line options and ensure consistency by using the configuration file to automate often-used command-line entries. You can insert any valid command-line option into the configuration file. The compiler processes options in the configuration file in the order they appear followed by the command-line options that you specify when you invoke the compiler.

Note

Options in the configuration file will be executed every time you run the compiler. If you have varying option requirements for different projects, see Response Files.

How to Use Configuration Files

The following example illustrates a basic configuration file. After you have written the .cfg file, simply ensure it is in the same directory as the compiler's executable file when you run the compiler. The text following the pound (#) character is recognized as a comment. For IA-32 compilations, the configuration file is icc.cfg. For compilations targeted for Itanium®-based systems, the configuration file is ecc.cfg.

## Sample configuration file.
## Define preprocessor macro MY_PROJECT.

-DMY_PROJECT

## Additional directories to be searched
## for INCLUDE files, before the default.

-I /project/include