Make RocksDB run git submodule init and update if rocksdb is not fetched

This commit is contained in:
Vicențiu Ciorbaru 2017-02-07 20:40:55 +02:00
parent 5875633c2a
commit 884fd9ac2b

View file

@ -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\".")