Commit df0bd439 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

fix deps submodule init on windows

`git submodule update --remote --recursive` must be called with `--init`
if the submodules have never been initialized, add the flag to the cmake
code that does this. If they are already initialized, it will not cause
any harm.
parent 42045025
...@@ -303,11 +303,11 @@ IF(WIN32) ...@@ -303,11 +303,11 @@ IF(WIN32)
find_package(Git) find_package(Git)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git") if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
set(git_checkout TRUE) set(git_checkout TRUE)
execute_process(COMMAND "${GIT_EXECUTABLE}" submodule update --remote --recursive RESULT_VARIABLE git_status WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") execute_process(COMMAND "${GIT_EXECUTABLE}" submodule update --init --remote --recursive RESULT_VARIABLE git_status WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
endif() endif()
if(NOT (git_checkout AND git_status EQUAL 0)) if(NOT (git_checkout AND git_status EQUAL 0))
message(FATAL_ERROR "Please pull in git submodules, e.g.\nrun: git submodule update --remote --recursive") message(FATAL_ERROR "Please pull in git submodules, e.g.\nrun: git submodule update --init --remote --recursive")
endif() endif()
ENDIF() ENDIF()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment