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

YCMEPHelper: add SHALLOW option to wrap EP's GIT_SHALLOW option #440

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
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
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