precompile_target

Specifies the file name for a precompiled header file.

Syntax
  #pragma precompile_target filename
  
  
Parameters

filename

A simple file name or an absolute path name. If filename is a simple file name, the compiler saves the file in the same folder as the source file. If filename is a path name, the compiler saves the file in the specified folder.

Remarks

If you do not specify the file name, the compiler gives the precompiled header file the same name as its source file.

The following listing shows sample source code from a precompiled header source file. By using the predefined symbols __cplusplus and the pragma precompile_target, the compiler can use the same source code to create different precompiled header files for C and C++.

Listing: Using #pragma precompile_target

#ifdef __cplusplus

  #pragma precompile_target "MyCPPHeaders"

#else

  #pragma precompile_target "MyCHeaders"

#endif

This pragma does not correspond to any panel setting.