ament_vendor should be able to use mirror site of git
- Dominant language
- CMake
- Stars
- 125
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
In Ros2, `ament_vendor` is mainly used like this:
```cmake
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.
Contributor guide
Assessment
This issue has not been assessed yet.