use-pch

Lets you use a specific precompiled header file.

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: -use-pch {file | dir}
Windows:    None

Arguments

file      Is the name of the precompiled header file to use.
dir      Is the path where the file is located, including file. The path must exist.

Default

OFF      The compiler does not create or use precompiled headers unless you tell it to do so.

Description

This option lets you use a specific precompiled header (PCH) file. It is supported for multiple source files when all source files use the same .pchi file.

This option cannot be used in the same compilation as the -create-pch option.

Caution
Depending on how you organize the header files listed in your sources, this option may increase compile times. To learn how to optimize compile times using the PCH options, see "Precompiled Header Files" in the User's Guide.

Alternate Options

Linux: -use_pch
Windows: None

Example

Consider the following command line:

icpc -use-pch /pch/source32.pchi source.cpp

It produces the following output:

"source.cpp": using precompiled header file /pch/source32.pchi

See Also

create_pch compiler option