IBM Support

Using precompiled header files while building a Rose RealTime model

Troubleshooting


Problem

The Microsoft Visual Studio C++ (MSVC++) compiler supports an option that saves all of the preprocessing for a group of header files into a single precompiled header file. This technote explains how to use this type of file to reduce Rose RealTime build times.

Resolving The Problem

Note: This technote uses MSVC++ as an example to illustrate the concept. Consult the documentation for your compiler to see if it supports generation of precompiled headers.



Starting with the 2002.05.00 release of IBM Rational Rose RealTime, the specification for a component may be modified so that a precompiled header (.pch) file is generated in the initial compilation phase and then utilized in the compilation of all the component's class (.cpp) files.

Open the specification on the component you wish to build and add to the CompilationMakeInsert (Component, C++ Compilation) property:

$(ALL_OBJS) : RTSystem/MyComponent.pch
RTSystem/MyComponent.pch :
$(USER_CC) \
/c $(LIBSETCCFLAGS) $(TARGETCCFLAGS) $(RTSYSTEM_INCPATHS) \
/YcRTSystem/MyComponent.h \
$(USER_CCFLAGS) \
$(USER_INCPATHS) \
../src/RTSystem/MyComponent.cpp \
$(CC_TAIL)

And to the CompileArguments (Component, C++ Compilation) property add:

/YuRTSystem/MyComponent.h


The result of these additions will be a precompiled header file (MyComponent.pch) constructed prior to the compilation of the class files, since $(ALL_OBJS) is dependent on this file, and the compilation of the class files will utilize this precompiled header file.

The use of the precompiled header file will avoid the repeated preprocessing of all the Visual Studio and Rose RealTime TargetRTS header files for each class in the model.






[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2002;2003","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

120897823

Document Information

More support for:
Rational Rose RealTime

Software version:
2002, 2003

Operating system(s):
Windows

Document number:
78997

Modified date:
16 June 2018

UID

swg21180630