Fixes issue 871 (#873)
This commit is contained in:
parent
3c3a4db54e
commit
0c19848230
|
@ -4,8 +4,8 @@ function(initialize_submodule DIRECTORY)
|
||||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git)
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git)
|
||||||
find_package(Git QUIET REQUIRED)
|
find_package(Git QUIET REQUIRED)
|
||||||
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git does not exist. Initializing ${DIRECTORY} submodule ...")
|
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git does not exist. Initializing ${DIRECTORY} submodule ...")
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init ${DIRECTORY}
|
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init ${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
RESULT_VARIABLE GIT_EXIT_CODE)
|
RESULT_VARIABLE GIT_EXIT_CODE)
|
||||||
if(NOT GIT_EXIT_CODE EQUAL "0")
|
if(NOT GIT_EXIT_CODE EQUAL "0")
|
||||||
message(FATAL_ERROR "${GIT_EXECUTABLE} submodule update --init dependencies/${DIRECTORY} failed with exit code ${GIT_EXIT_CODE}, please checkout submodules")
|
message(FATAL_ERROR "${GIT_EXECUTABLE} submodule update --init dependencies/${DIRECTORY} failed with exit code ${GIT_EXIT_CODE}, please checkout submodules")
|
||||||
|
|
Loading…
Reference in New Issue