Files
portfolio-redo/cmake/FetchSubmodules.cmake
2025-07-24 10:31:02 -05:00

14 lines
433 B
CMake

# 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()