Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env value for VCS_URL #474

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ament_cmake_vendor_package/cmake/ament_vendor.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,17 @@ macro(ament_vendor TARGET_NAME)
"${_ARG_UNPARSED_ARGUMENTS}")
endif()

set(ENV_VCS_URL_NAME ${TARGET_NAME}_VCS_URL)
if (DEFINED ENV{${ENV_VCS_URL_NAME}})
message(STATUS "Use mirror of ${ENV_VCS_URL_NAME}: $ENV{${ENV_VCS_URL_NAME}}")
set(_ARG_VCS_URL $ENV{${ENV_VCS_URL_NAME}})
endif()
if(NOT _ARG_VCS_URL)
message(FATAL_ERROR "ament_vendor() must be called with the VCS_URL argument")
else()
message(STATUS "${TARGET_NAME} VCS_URL: ${_ARG_VCS_URL}")
endif()

if(_ARG_VCS_TYPE STREQUAL "path")
if(_ARG_SOURCE_SUBDIR)
message(FATAL_ERROR "ament_vendor() cannot use VCS_TYPE 'path' with SOURCE_SUBDIR argument")
Expand Down