/FPfilename
Option (/Fp)
Use the /Fp option to specify the name of the desired .PCH file in cases where the .PCH filename specified with the /Yc option is different from the filename of the associated include file or source file. You can use the /Fp option with both the /Yc and the /Yu options. For example, if you want to create a precompiled header file for a debugging version of your program, you can specify a command such as:
CL /DDEBUG /YcPROG.H /FpDPROG.PCH PROG.CPP
This command creates a precompilation of all header files up to and including PROG.H, and stores it in a file called DPROG.PCH. If you need a release version in parallel, you simply change the compilation command to:
CL /YcPROG.H /FpRPROG.PCH PROG.CPP
This command creates a separate precompilation of the header files up to and including PROG.H and stores it in RPROG.PCH.
You can use the /Fp option with the /Yu option to specify the name of the .PCH file if the name is different from either the filename argument to /Yc or the base name of the source file:
CL /YuPROG.H /FpZPROG.PCH PROG.CPP
This command specifies a precompiled header file named ZPROG.PCH. The compiler uses the contents of ZPROG.H to restore the precompiled state of all header files up to and including PROG.H. The compiler then compiles the code that occurs after the PROG.H include statement.
For more information on precompiled headers, see Chapter 2 in the Programming Techniques manual. The related options /Yc, /Yd, and /Yu are described in the sections that follow.