User and Reference Guide for the Intel® C++ Compiler 14.0
Tells the compiler to use appropriate precompiled header files.
Linux OS and OS X: | -pch |
Windows OS: | None |
None
OFF |
The compiler does not create or use precompiled headers unless you tell it to do so. |
This option tells the compiler to use appropriate precompiled header (PCH) files. If none are available, they are created as sourcefile.pchi. This option is supported for multiple source files.
The -pch option will use PCH files created from other sources if the headers files are the same. For example, if you compile source1.cpp using -pch, then source1.pchi is created. If you then compile source2.cpp using -pch, the compiler will use source1.pchi if it detects the same headers.
Depending on how you organize the header files listed in your sources, this option may increase compile times.
Windows: None
Linux: Precompiled Headers > Automatic Processing for Precompiled Headers
OS X: Precompiled Headers > Precompile Prefix Header
None
Consider the following command line:
icpc -pch source1.cpp source2.cpp
It produces the following output when .pchi files do not exist:
"source1.cpp": creating precompiled header file "source1.pchi"
"source2.cpp": creating precompiled header file "source2.pchi"
It produces the following output when .pchi files do exist:
"source1.cpp": using precompiled header file"source1.pchi"
"source2.cpp": using precompiled header file "source2.pchi"