Skip to content

Support default values for preprocessor definitions #93

@eyalroz

Description

@eyalroz

At the moment, if a preprocessor definition was not specified on the command line, using a default requires quite a bit of code in the kernel adapter:

virtual void generate_additional_preprocessor_definitions(execution_context_t& context) const
{
    auto my_def = safe_get_defined_value<whatever>(context.options.preprocessor_definitions.valued, "MY_DEF");
    if (not my_def) {
        context.preprocessor_definitions.generated.valued["MY_DEF"] = default_value_of_my_def;
    }
}

instead, it would be nice if we could simply specify the default value in the parameter definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions