From 8ac7ba7d9978d3fa1698dfbdcfc6ccf84867bfd2 Mon Sep 17 00:00:00 2001 From: wowario Date: Wed, 12 Dec 2018 13:55:37 +0300 Subject: [PATCH] Update and init submodules by default --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d942d31cc..5e7791f0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,15 @@ else() message(STATUS "Building without build tag") endif() +# Update and init submodules by default +if(NOT MANUAL_SUBMODULES) + find_package(Git) + if(GIT_FOUND) + message(STATUS "Initializing submodules") + execute_process(COMMAND git "submodule" "update" "--init" "--recursive" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + endif() +endif() + if(NOT MANUAL_SUBMODULES) find_package(Git) if(GIT_FOUND) @@ -239,7 +248,7 @@ endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) enable_testing() -option(BUILD_DOCUMENTATION "Build the Doxygen documentation." ON) +option(BUILD_DOCUMENTATION "Build the Doxygen documentation." OFF) option(BUILD_TESTS "Build tests." OFF) # Check whether we're on a 32-bit or 64-bit system