Intel® C++ Compiler XE 13.1 User and Reference Guides

pch-dir

Tells the compiler the location for precompiled header files.

IDE Equivalent

Windows: None

Linux: Precompiled Headers > Precompiled Headers' File Directory

OS X: Precompiled Headers > Prefix Header

Architectures

All

Syntax

Linux and OS X:

-pch-dir dir

Windows:

None

Arguments

dir

Is the path for precompiled header files. 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 the location for precompiled header files. It denotes where to find precompiled header files, and where new PCH files should be placed.

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

To learn how to optimize compile times using the PCH options, see "Using 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


Submit feedback on this help topic