Specifying compiler directives and project settings

You use a project's properties, the project build configuration properties, or a folder's or file's properties to control the build behavior of projects. You access these by choosing Properties on the context menu for projects, folders and files. This is how setting these properties works:

You can set SQL and CICS preprocessor directives at the project level, even when the project settings are not configured to run the preprocessors. The use of the preprocessors can then be turned on at the file level, which inherits the project level preprocessor directives. This enables you to use the project level as a template for file-level settings.

When COBOL sources are copied into a project from outside the workspace, by default, a process known as directives determination is performed automatically. The IDE detects and sets the correct dialect and use of preprocessors. You can control this default behavior from Window > Preferences > Micro Focus > COBOL|PL/I > Directives Determination - set the Perform automatic directives determination setting to the desired option.

You can also trigger directives determination manually using the Determine Directives context menu command for projects, folder and programs in the Application Explorer view, COBOL Explorer or the PL/I Explorer view. You can turn off or configure this behavior using the Micro Focus > COBOL > Directives Determination page in the IDE preferences (click Window > Preferences). For PL/I projects, you can configure the directives determination from the Micro Focus > PL/I > Directives Determination page in the IDE preferences.

Overridden Project Settings

You can display the project settings that have been overridden by build configurations, folder settings, and file settings:
  1. Right-click the project.
  2. Click Micro Focus > Project Settings.
  3. Click Search to search the project for overridden options.

    This displays the Overridden options list.

The groupings displayed in the Overridden options list are by Micro Focus file types and build ++ configurations. You can expand individual categories to explore the associated overridden options. Double-clicking a node in the Overridden options list opens the respective file properties or build configurations dialog box.
Note: Any changes made in the file, folder, or build configuration settings are not automatically refreshed in the overridden options list. You must rerun the search to display any changes made.

Dependency Path Handling

The Automatically add new directories to dependency paths preference on the Window > Micro Focus > Builder page in the IDE preferences (click Window > Preferences) controls whether adding a directory to a project also causes the directory to be added as an enabled item onto the dependency paths of the project. If you add a new copybook in a new folder and your build fails, you should check whether this preference is enabled or disabled and also check the project dependency paths settings.

You can also control the initial position of new directories by using the Insert to the beginning of dependency paths list or Append to the end of dependency paths list. Once the directories are added, you can manually position them in the required order.