Using Configuration Files

You can decrease the time you spend entering command-line options by using the configuration file to automate command-line entries. Add any valid command-line option to 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. 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.

How to Use Configuration Files

The following example illustrates a basic configuration file. The text following the "#" character is recognized as a comment. The configuration file, icc.cfg and icpc.cfg, is located in the same directory as the compiler's executable file. You should modify the configuration file environment variable if you need to specify a different location for the configuration file.

# Sample configuration file.
-I/my_headers

In this example, the compiler reads the configuration file and invokes the -I option every time you run the compiler, along with any options you specify on the command line.

See Also


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.