Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Use Configuration Files

You can decrease the time you spend entering command-line options by using the configuration file to automate command-line entries. Configuration files are automatically processed every time you run the Intel® C++ Compiler Classic. 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 specified command-line options when the compiler is invoked.

NOTE:

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

Sample Configuration Files

The default configuration files icc.cfg and icpc.cfg (Linux* and macOS) or or icl.cfg (Windows*), are located in the same directory as the compiler executable file. If you want to use a different configuration file than the default, you can use the ICCCFG/ICPCCFG (for Linux* and macOS) or ICLCFG (for Windows) environment variables to specify the location of another configuration file.

NOTE:

Anytime you instruct the compiler to use a different configuration file, the default configuration file(s) are ignored.

The following examples illustrate basic configuration files.

Linux

## Sample icpc.cfg file
  -I/my_headers  

Windows

## Sample icl.cfg file
  /Ic:\my_headers 
In the Windows examples, the compiler reads the configuration file and invokes the I option every time you run the compiler, along with any options specified on the command line.