未验证 提交 ccc675db 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

enh: cmake git submodule (#12301)

* enh: add git submodule in cmake

* use warning instead of fatal if submodule not found

* enh: cmake git submodule

use community dir var

[TD-15342]
上级 2e87f895
...@@ -20,7 +20,7 @@ MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH ...@@ -20,7 +20,7 @@ MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH
MESSAGE(STATUS "Project library files output path: " ${LIBRARY_OUTPUT_PATH}) MESSAGE(STATUS "Project library files output path: " ${LIBRARY_OUTPUT_PATH})
find_package(Git QUIET) find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") if(GIT_FOUND AND EXISTS "${TD_COMMUNITY_DIR}/.git")
# Update submodules as needed # Update submodules as needed
option(GIT_SUBMODULE "Check submodules during build" ON) option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE) if(GIT_SUBMODULE)
...@@ -34,7 +34,7 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") ...@@ -34,7 +34,7 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif() endif()
endif() endif()
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/jemalloc/Makefile.in") if(NOT EXISTS "${TD_COMMUNITY_DIR}/deps/jemalloc/Makefile.in")
message(WARNING "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules manually if you need build them.") message(WARNING "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules manually if you need build them.")
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册