Developer Guide and Reference

ID 767253
Date 10/31/2024
Public
Document Table of Contents

Use Response Files

You can use response files to:

  • Specify options used during particular compilations or projects.

  • Save this information in individual files.

You can invoke response files as options on the command line. Unlike configuration files, which are automatically processed every time you run the compiler, response files must be invoked as an option on the command line. If you create a response file without specifying it on the command line, it will not be invoked.

Sample Response Files

Linux

vi response1.txt 
  -fp-model=precise  
vi response2.txt 
  -O0
Windows
notepad response1.txt
  /fp:precise 
notepad response2.txt 
  /O0 

You can use response files to decrease the time spent entering command-line options and to ensure consistency by automating command-line entries. Use individual response files to maintain options for specific projects.

Options or file names can be placed on a line in a response file. Several response files can be referenced in the same command line. The following example shows how to specify a response file on the command line:

Linux

  icpx @response1.txt prog1.cpp @response2.txt prog2.cpp
Windows
  icx @response1.txt prog1.cpp @response2.txt prog2.cpp

NOTE:
An at sign (@) must precede the name of the response file on the command line.