views:

96

answers:

0

Hi everyone,

I am using CMake to manage a build of a collection of projects on Linux, not a single project but the principle is the same. Each project has its own collection of options, for example DEVEL switches and custom code to be included. These are added in the standard CMake way:

OPTION(NAME "Helpstring" VALUE)

I am looking for a way to group these options based on which project they belong to as currently they are placed in alphabetical order and could be quite confusing. It would also save me coming up with unique names for each option, for example a DEVEL option could apply for all of the projects, but I might only want to enable it on some. I do not want to write e.g. PROJECTNAME_DEVEL options.

Ideally I would like a system to divide the options based on project, e.g.

PROJECT1NAME:
    DEVEL: ON
PROJECT2NAME:
    DEVEL: OFF
    ANOTHER_OPTION: ON

Can I do this somehow? I am primarily aiming this at the ncurses interface to cmake, I see that the Qt interface can group entries, so is this possible in the ncurses interface?

Cheers