boilerplate's down
This commit is contained in:
13
cmake/FetchSubmodules.cmake
Normal file
13
cmake/FetchSubmodules.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
# Automatically initialize and update Git submodules
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
message(STATUS "Updating Git submodules...")
|
||||
execute_process(
|
||||
COMMAND git submodule update --init --recursive
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT
|
||||
)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to update Git submodules")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user