Skip to content

hunter_default_version should be callable from user config #6

Open
@interj

Description

@interj

Do variables __HUNTER_LAST_DEFAULT_VERSION_NAME, __HUNTER_ALLOW_DEFAULT_VERSION_LOADING and checks related to them protect hunter users against doing anything wrong?
The only effect to these checks I've found is disabling hunter_default_version in user config, which allows you to add a new package without forking whole hunter. You can also change a version of an existing package, but you can do the same with hunter_config.

You can test it by setting this in local config

set(__HUNTER_LAST_DEFAULT_VERSION_NAME "" 
    "Disable alphabetic verification of hunter_default_version calls")
set(__HUNTER_ALLOW_DEFAULT_VERSION_LOADING YES 
    "Allow hunter_default_version calls outside Hunter")
hunter_default_version(some_package_added_to_HUNTER_SELF/cmake/projects VERSION ...)

I've used this for a while and didn't find any problem with it, so maybe those checks should be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogSomething that needs more investigation but is lower priorityenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions