Skip to content

Commit 884fd9a

Browse files
committed
Make RocksDB run git submodule init and update if rocksdb is not fetched
1 parent 5875633 commit 884fd9a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# TODO: Copyrights
2-
2+
IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile AND GIT_EXECUTABLE)
3+
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule init
4+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
5+
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update
6+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
7+
ENDIF()
38

49
IF (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile")
510
MESSAGE(SEND_ERROR "Missing Makefile in rocksdb directory. Try \"git submodule update\".")

0 commit comments

Comments
 (0)