/Fp (Name .Pch File)
For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.
Provides a path name for a precompiled header instead of using the default path name.
Use this option with /Yc (Create Precompiled Header File) or /Yu (Use Precompiled Header File) to provide a path name for a precompiled header instead of using the default path name. You can also use /Fp with /Yc to specify the use of a precompiled header file that differs from the /Yc
filename argument and from the base name of the source file.
If you do not specify an extension as part of the path name, an extension of .pch is assumed. If you specify a directory without a file name, the default file name is VC
x is the major version of Visual C++ in use.
You can also use the /Fp option with /Yu.
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
Click the C/C++ folder.
Click the Precompiled Headers property page.
Modify the Precompiled Header File property.
If you want to create a precompiled header file for a debugging version of your program and you are compiling both header files and source code, you can specify a command such as:
CL /DDEBUG /Zi /Yc /FpDPROG.PCH PROG.CPP
The following command specifies the use of a precompiled header file named MYPCH.pch. The compiler assumes that the source code in PROG.cpp has been precompiled through MYAPP.h and that the precompiled code resides in MYPCH.pch. It uses the content of MYPCH.pch and compiles the rest of PROG.cpp to create an .obj file. The output of this example is a file named PROG.exe.
CL /YuMYAPP.H /FpMYPCH.PCH PROG.CPP