ExternalProject_Add and git tags
in our SuperBuild we use
ExternalProject_Add(${proj}
GIT_REPOSITORY ${${proj}_URL}
GIT_TAG ${${proj}_TAG}
...)
We run into a problem when using a tag (as opposed to a hash or remote branch), the tag isn't recognised.
fatal: ambiguous argument 'rel_4.0.1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Steps to reproduce
- git clone the superbuild
- build, everything is fine
- update one of the external projects and tag it
- build the superbuild with the new tag
It seems that ExternalProject_Add
does a git fetch
but not git fetch --tags
. Some more info is at
https://github.com/SyneRBI/SIRF-SuperBuild/issues/388