Visible to Intel only — GUID: GUID-366E0C03-6A68-4E46-A904-3E612AFC7DDD
Visible to Intel only — GUID: GUID-366E0C03-6A68-4E46-A904-3E612AFC7DDD
Yc
Tells the compiler to create a precompiled header file.
Linux: |
None |
Windows: |
/Yc[filename] |
filename |
Is the name of a C/C++ header file, which is included in the source file using an #include preprocessor directive. |
OFF |
The compiler does not create or use precompiled headers unless you tell it to do so. |
This option tells the compiler to create a precompiled header (PCH) file. It is supported only for single source file compilations.
When filename is specified, the compiler creates a precompiled header file from the headers in the C/C++ program up to and including the C/C++ header specified.
If you do not specify filename, the compiler compiles all code up to the end of the source file, or to the point in the source file where a hdrstop occurs. The default name for the resulting file is the name of the source file with extension .pch.
This option cannot be used in the same compilation as the /Yu option.
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.
Visual Studio: Precompiled Headers > Precompiled Header File
Eclipse: None
None
Example
If option /Fp is used, it names the PCH file. Consider the following example command:
icx /c /Ycheader.h /Fpprecomp foo.cpp icx /c /Yc /Fpprecomp foo.cpp
The name of the PCH file is precomp.pch.
If the header file name is specified, the file name is based on the header file name. For example:
icx /c /Ycheader.h foo.cpp
The name of the PCH file is header.pch.
If no header file name is specified, the file name is based on the source file name. For example:
icx /c /Yc foo.cpp
The name of the PCH file is foo.pch.