C++ only


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


Read syntax diagramSkip visual syntax diagram        .-templaterecompile---.
>>- -q--+-notemplaterecompile-+--------------------------------><


The -qtemplaterecompile option is intended to be used with the -qtemplateregistry option. Given a program in which multiple compilation units reference the same template instantiation, the -qtemplateregistry option specifies a single compilation unit to contain the instantiation. No other compilation units will contain this instantiation, and duplication of object code is avoided.

If a source file that has been compiled previously is compiled again, the -qtemplaterecompile 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 -qtemplaterecompile option requires that object files generated by the compiler remain in the subdirectory to which they were originally written. If your automated build process moves object files from their original subdirectory, use the -qnotemplaterecompile option whenever -qtemplateregistry is enabled.

Related information