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.

Using #pragma precompile_target 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 1. 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.

Related information
check_header_flags
faster_pch_gen
flat_include
fullpath_file
fullpath_prepdump
keepcomments
line_prepdump
macro_prepdump
msg_show_lineref
msg_show_realref
notonce
old_pragma_once
once
pop, push
pragma_prepdump
simple_prepdump
space_prepdump
srcrelincludes
syspath_once