Skip to content

CMake imported targets do not use namespace #25

@mjacobse

Description

@mjacobse

Have you considered putting the imported targets into a namespace? This is recommended to avoid some issues as described in this CMake blogpost. The change could be as simple as adding NAMESPACE ampl-asl:: to this command:

install(EXPORT ampl-asl-config DESTINATION share/ampl-asl COMPONENT asl)

Unfortunately I believe this might be a breaking change for current users who do find_package(ampl-asl) and expect it to provide a plain asl target instead of ampl-asl::asl. Perhaps a fallback target with a deprecation message like in that same blogpost might be worth to consider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions