pch-dir

Tells the compiler where to find or create a file for precompiled headers.

IDE Equivalent

None

Architectures

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

Syntax

Linux: -pch-dir dir
Windows:    None

Arguments

dir      Is the path where the file is located or should be created. 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 tells the compiler where to find or create a file (PCH) for precompiled headers.

This option can be used with the -pch, -create_pch, and -use-pch options.

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

None

Example

Consider the following command line:

icpc -pch -pch_dir /pch source32.cpp

It produces the following output:

"source32.cpp": creating precompiled header file /pch/source32.pchi

See Also