Skip to content

Commit

Permalink
env value for VCS_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
felixf4xu committed Jul 8, 2023
1 parent b11f831 commit 1b26b7a
Showing 1 changed file with 8 additions and 0 deletions.
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 "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

0 comments on commit 1b26b7a

Please sign in to comment.