From 884fd9ac2ba59a8d6a86a53bb52df175e130f38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Tue, 7 Feb 2017 20:40:55 +0200 Subject: [PATCH] Make RocksDB run git submodule init and update if rocksdb is not fetched --- storage/rocksdb/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index e9e63dcfcd7..e14cbd7f31a 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -1,5 +1,10 @@ # TODO: Copyrights - +IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile AND GIT_EXECUTABLE) + EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule init + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") +ENDIF() IF (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile") MESSAGE(SEND_ERROR "Missing Makefile in rocksdb directory. Try \"git submodule update\".")