Skip to content

ament_vendor should be able to use mirror site of git #473

Open
@felixf4xu

Description

@felixf4xu

In Ros2, ament_vendor is mainly used like this:

ament_vendor(assimp_vendor
  SATISFIED ${assimp_FOUND}
  VCS_URL https://github.com/assimp/assimp.git
  VCS_VERSION v5.2.2
  CMAKE_ARGS
    -DASSIMP_BUILD_ASSIMP_TOOLS:BOOL=OFF
    -DASSIMP_BUILD_TESTS:BOOL=OFF
    -DASSIMP_BUILD_SAMPLES:BOOL=OFF
    "${ASSIMP_CMAKE_FLAGS}"
    "-DCMAKE_CXX_FLAGS=${ASSIMP_CXX_FLAGS}"
  PATCHES patches
)

and VCS_URL https://github.com/assimp/assimp.git is usually hardcoded.

When a mirror site of github is needed to build ros2, it's very difficult to set the mirror site URL unless the source code is modified.

I'm proposing an updated version of macro ament_vendor so that it can use env variable (if set) as a prioritized value of VCS_URL.

As a result, for all the xxxxx_vendor projects, it's not necessary to touch the source code of VCS_URL but to set an environmental value of assimp_vendor_VCS_URL in my case and use the mirror git site.

Any comment? I can create a PR for it.

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