I am using CMake
in my project, and a bug is reported.
My CMakeLists.txt
is:
...
include(FetchContent)
FetchContent_Declare(SUTK
GIT_REPOSITORY "xxx"
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/SUTK"
)
FetchContent_MakeAvailable(SUTK)
...
And it reports a bug:
Performing download step (git clone) for 'sutk-populate'
Cloing into 'SUTK'
fatal: invalid reference: master
CMake Error at build/_deps/sutk-subbuild/..../sutk-populate-gitclone.cmake:40 (message):
Failed to checkout tag: 'master'
Actually, there is no master
branch in my repo. Because the default branch name is main
.
How to fix this bug? Any suggestion is appreciated~~~