Skip to content

Commit

Permalink
YCMEPHelper: add SHALLOW option to wrap EP's GIT_SHALLOW option (#440)
Browse files Browse the repository at this point in the history
* YCMEPHelper: add SHALLOW option to wrap EP's GIT_SHALLOW option
  • Loading branch information
traversaro authored Dec 20, 2023
1 parent 38aa0b5 commit e187cdb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased Patch]

## [0.16.2] - 2023-12-20

### Added

* YCMEPHelper: add SHALLOW option to permit to pass GIT_SHALLOW option to ExternalProject_Add (https://github.com/robotology/ycm/pull/440).

## [0.16.1] - 2023-11-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion internal-modules/YCMVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include(GitInfo)

set(YCM_VERSION_MAJOR 0)
set(YCM_VERSION_MINOR 16)
set(YCM_VERSION_PATCH 1)
set(YCM_VERSION_PATCH 2)

set(YCM_VERSION_API "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}")
set(YCM_VERSION_SHORT "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}")
Expand Down
7 changes: 7 additions & 0 deletions modules/YCMEPHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ A helper for :module:`ExternalProject`::
[FOLDER <folder> (default = "<component>")
[REPOSITORY <repo>]
[EXCLUDE_FROM_ALL <0|1>]
#--Git only arguments-----------
[SHALLOW <bool>]
#--Git and Hg only arguments-----------
[TAG <tag>]
#--Svn only arguments-----------
Expand Down Expand Up @@ -732,6 +734,7 @@ function(YCM_EP_HELPER _name)
COMPONENT
FOLDER
EXCLUDE_FROM_ALL
SHALLOW # GIT only
REPOSITORY # GIT, SVN and HG
TAG # GIT and HG only
REVISION # SVN only
Expand Down Expand Up @@ -967,6 +970,10 @@ function(YCM_EP_HELPER _name)
list(APPEND ${_name}_REPOSITORY_ARGS GIT_TAG ${_YH_${_name}_TAG})
endif()

if(DEFINED _YH_${_name}_SHALLOW)
list(APPEND ${_name}_REPOSITORY_ARGS GIT_SHALLOW ${_YH_${_name}_SHALLOW})
endif()

if(YCM_GIT_${_YH_${_name}_STYLE}_COMMIT_NAME)
unset(${_name}_COMMIT_NAME)
set(_setup_repo_cmd ${_setup_repo_cmd}
Expand Down

0 comments on commit e187cdb

Please sign in to comment.