Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-02-27 13:49:55 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-02-27 13:49:55 +0300
commit5dc04e3fde056fed5ef50c0b7e59773090c5880a (patch)
tree39dc18e7ce70888b7001721f91e6b9abe0980e8d /CMakeLists.txt
parent6a1741fb75cb38d26933e8ee0bfa1eb6bb14f561 (diff)
Add automatic git submodule update to build, in case the user forgot to do it.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 461ca9a2..60d808f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,18 @@ include(QuickCppLibPolicies)
option(LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE "Whether to use SG14 status_code for failure handling" OFF)
+if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/llfio/ntkernel-error-category/include")
+ include(FindGit)
+ message(STATUS "NOTE: Running ${GIT_EXECUTABLE} submodule update --init --recursive ...")
+ execute_process(COMMAND "${GIT_EXECUTABLE}" submodule update --init --recursive
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE retcode
+ )
+ if(retcode)
+ message(FATAL_ERROR "FATAL: git submodule update failed with code ${retcode}")
+ endif()
+endif()
+
# Parse the version we tell cmake directly from the version header file
ParseProjectVersionFromHpp("${CMAKE_CURRENT_SOURCE_DIR}/include/llfio/version.hpp" VERSIONSTRING)
# Sets the usual PROJECT_NAME etc