Skip to content

[RFC] cmake: Build option naming #194

@hebasto

Description

@hebasto

All build options effectively are cache variables, whose values persist across multiple runs within a project build tree.

From the Professional CMake: A Practical Guide 18th Edition:

Cache variables are primarily intended as a customization point for developers.

The current (@ 9857482) build option set being presented in the CMake GUI tool looks as follows:

Screenshot from 2024-05-08 22-45-52

Please note that selecting the "Grouped" checkbox groups variables together based on the start of the variable name up to the first underscore. CMake reserves names that begin with CMAKE_.

  1. The group of BUILD_* options is presented in the "Executables" and "Tests" sections of the "Configure summary".

Please note, that CMake's CTest module:

automatically creates a BUILD_TESTING option...

  1. The group of WITH_* options is presented in the "Wallet support" and "Optional packages features" section of the "Configure summary".

However, the MULTIPROCESS option has no WITH_ prefix.

  1. Switching to upstream CMake-based build systems for subtrees (see cmake: Switch to libsecp256k1 upstream build system #192) will expose their own options. Thus, libsecp256k1 introduces SECP256K1_* names.

This issue aims to gather suggestions and opinions regarding better naming. Please vote for each suggestion using 👍 for approval and 👎 for disapproval.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions