fix git submodule update command
This commit is contained in:
parent
bce32e2ba1
commit
1199381803
1 changed files with 2 additions and 2 deletions
|
@ -28,11 +28,11 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||||
option(GIT_SUBMODULE "Check submodules during build" ON)
|
option(GIT_SUBMODULE "Check submodules during build" ON)
|
||||||
if(GIT_SUBMODULE)
|
if(GIT_SUBMODULE)
|
||||||
message(STATUS "Updating submodules")
|
message(STATUS "Updating submodules")
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --remote
|
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --checkout
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||||
message(FATAL_ERROR "`git submodule update --init --recursive --remote` failed with ${GIT_SUBMOD_RESULT}, please provide the submodules manually")
|
message(FATAL_ERROR "`git submodule update --init --recursive --checkout` failed with ${GIT_SUBMOD_RESULT}, please provide the submodules manually")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue