Skip to content
Stephen Orso edited this page May 13, 2018 · 1 revision

WikiCMake Build LogicCMake ScriptsHerc1*.cmake

Two scripts define the Hercules build options, set defaults for those options, and edit user-provided option values.

Defines Hercules-specific build options

Defines a short description and longer help text for those options.

Creates a list of all defined options to enable display of help text by the parent CMakeLists.txt.

Sets defaults for all options. Defaults may vary depending on system type (Windows, macOS, UNIX-like).


If help has been requested (-DHELP=YES), displays help and returns without editing any options.

Edits all yes-no options for a valid abbreviation of Yes or No.

If c options have been provided in ADD-CFLAGS and/or OPTIMIZATION, run a trial compilation to validate the options.

Validates the Bzip2-related options for consistency. For example, one cannot specify -DCCKD-BZIP2=Yes and -DBZIP2=NO.

Validates the Zlib-related options for consistency.

Verifies that all directory options, e.g., -DBZIP2_DIR, point to existing directories that contain an importable CMake target for the respective package.

Verifies that the -DEXTPKG_DIR directory either exists or can be created.

For Windows builds that include Open Object Rexx and/or Regina Rexx, ensures that an installed version of the external package matches the bit-ness of Hercules being built. One cannot use a 32-bit version of either REXX application with a 64-bit Hercules and vice versa.


This Wiki page Copyright © 2018 by Stephen R. Orso. This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.