Passing GIT_TAG to project doesn't seem to have the expected effect
ruipacheco opened this issue · 1 comments
ruipacheco commented
I'm using DownloadProject to checkout a number of libraries I depend on, namely Asio. I've added what I think are the correct settings but when I run CMake it tells me it cannot checkout the branch:
include(DownloadProject.cmake)
download_project(PROJ asio
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG asio-1-10-8 # asio-1-10-8
${UPDATE_DISCONNECTED_IF_AVAILABLE}
)
and this raises the error:
$ cmake .
-- Downloading/updating asio
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruihpacheco/chi/databaseclient/cpp/build/asio-download
[ 11%] Performing download step (git clone) for 'asio-download'
Cloning into 'asio-src'...
error: pathspec 'asio-1-10-8' did not match any file(s) known to git.
CMake Error at asio-download/asio-download-prefix/tmp/asio-download-gitclone.cmake:65 (message):
Failed to checkout tag: 'asio-1-10-8'
make[2]: *** [asio-download-prefix/src/asio-download-stamp/asio-download-download] Error 1
make[1]: *** [CMakeFiles/asio-download.dir/all] Error 2
make: *** [all] Error 2
-- Downloading/updating fmt
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruihpacheco/chi/databaseclient/cpp/build/fmt-download
[ 11%] Skipping update step for 'fmt-download'
[ 22%] No configure step for 'fmt-download'
[ 33%] No build step for 'fmt-download'
[ 44%] No install step for 'fmt-download'
[ 55%] No test step for 'fmt-download'
[ 66%] Completed 'fmt-download'
[100%] Built target fmt-download
-- Downloading/updating googletest
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruihpacheco/chi/databaseclient/cpp/build/googletest-download
[ 11%] Skipping update step for 'googletest-download'
[ 22%] No configure step for 'googletest-download'
[ 33%] No build step for 'googletest-download'
[ 44%] No install step for 'googletest-download'
[ 55%] No test step for 'googletest-download'
[ 66%] Completed 'googletest-download'
[100%] Built target googletest-download
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruihpacheco/chi/databaseclient/cpp/build
Asio seems to have that tag: https://github.com/chriskohlhoff/asio/releases/tag/asio-1-10-8
This forces me to always be on master which is obviously less than optimal.
ruipacheco commented
My bad :)