TEMPLATERECOMPILE | NOTEMPLATERECOMPILE (C++ only)

Category

C++ template

Pragma equivalent

None.

Purpose

Helps manage dependencies between compilation units that have been compiled using the TEMPLATEREGISTRY compiler option.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-TEMPLATEREC---.   
>>-+-NOTEMPLATEREC-+-------------------------------------------><

Defaults

TEMPLATERECOMPILE

Usage

If a source file that has been compiled previously is compiled again, the TEMPLATERECOMPILE option consults the template registry to determine whether changes to this source file require the recompile of other compilation units. This can occur when the source file has changed in such a way that it no longer references a given instantiation and the corresponding object file previously contained the instantiation. If so, affected compilation units will be recompiled automatically.

The TEMPLATERECOMPILE option requires that object files generated by the compiler remain in the PDS or subdirectory to which they were originally written. If your automated build process moves object files from their original PDS or subdirectory, use the NOTEMPLATERECOMPILE option whenever TEMPLATEREGISTRY is enabled.

IPA effects

The IPA link step does not accept the TEMPLATERECOMPILE option. The compiler issues a warning message if you specify this option in the IPA link step.

Predefined macros

None.