pch-create, Yc

Lets you create and specify a name for a precompiled header file.

IDE Equivalent

Windows: Precompiled Headers > Create-Use Precompiled Header / Create-Use PCH Through File

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64, IA-64 architectures

Syntax

Linux and Mac OS X:

-pch-createfile

Windows:

/Ycfile

Arguments

file

Is the name for the precompiled header file.

Default

OFF

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

Description

This option lets you specify a name for a precompiled header (PCH) file. It is supported only for single source file compilations.

The .pchi extension is not automatically appended to the file name.

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

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-create /pch/source32.pchi source.cpp

It produces the following output:

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

See Also