CMakeLists.txt: download submodules if needed

Download git submodules if the CMakeLists.txt files for the configparser or cppgtfs directories are not present.
This commit is contained in:
Benitoite 2020-02-09 04:47:13 -08:00 committed by GitHub
parent 9262b3ad45
commit f856e9865c

View file

@ -68,6 +68,14 @@ else()
set(VERSION_GIT_FULL "${VERSION_GIT}-${VERSION_GIT_IS_DIRTY}")
endif()
# Download submodules if needed
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/configparser/CMakeLists.txt OR NOT EXISTS ${CMAKE_SOURCE_DIR}/src/cppgtfs/CMakeLists.txt)
execute_process(
COMMAND git submodule update --init --recursive
)
endif()
add_subdirectory(src)
# tests