In the accompanying article, Borland C++ 4.0 IDE - Building release candidates from source pools we show how you can apply options to different nodes in the project window. The project window that the Integrated Development Environment (IDE) displays for each project provides a concise view of your source files and targets. A fundamental feature of the project window is that it displays these elements hierarchicallythat is, it presents each part of the project as a branch of a tree.
Fortunately, this organization isn't just cosmetic. For example, if you make changes to the compiler settings of the entire project (by choosing Project... from the Options menu), those changes will apply to every source file that appears in the project window.
For each target you create, you can override project-wide settings. If you make changes to a target, those changes will affect the target itself and any source files that you add to that target. However, just as you can modify the target's settings, you can override a target's settings by modifying individual source files without those changes affecting other source files in the target or other targets in the project.
To demonstrate this graphically, let's refer to the example project in the accompanying article. If you right-click on the Final Output [SourcePool] node in the project window and choose View Options Hierarchy... from the pop-up menu, you'll see the Options Hierarchy dialog box, shown in Figure A.
Figure A - You can view the settings for each node in a project by using the Options Hierarchy dialog box.
Right-click on the sp_tmpl [.ide] node in the Project Options At list box. When you do this, you'll notice that the Options list box displays only those settings that apply to the entire project.
Now, click on the Final Output [SourcePool] node in the Project Options At list box. You'll notice that the project-wide options appear at the top of the Options list box as before, but the options for the Final Output source pool appear immediately below the project options.
If you continue moving down the hierarchy by clicking on the test
[.exe] node, the Finished [SourcePool] node, and
the source [.cpp] node, you'll see how each node
adds its own options below the options of its parent node. (By
the way, you'll notice that we didn't apply any
of the compiler options directly to the SOURCE.CPP file, and therefore
this file doesn't override any of the options it inherits
from its parent source pool.)
Copyright (c) 1996 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of Ziff-Davis Publishing Company.