mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Added the SUBMODULE_DIR_NAME variable for better submodule support (#4959)
* Added the CMAKE_MODULE_DIR_NAME variable for better submodule support * It should be called SUBMODULE_DIR_NAME instead
This commit is contained in:
parent
47cb1d1207
commit
2d1684bc2d
|
@ -36,7 +36,10 @@ function(add_git_dir_dependency GIT_DOT_FILE SUCCESS_VAR)
|
||||||
if (NOT EXISTS "${GIT_COMMON_DIR_FILE}")
|
if (NOT EXISTS "${GIT_COMMON_DIR_FILE}")
|
||||||
get_filename_component(GIT_WORKTREE_PARENT "${GIT_WORKTREE_DIR}" DIRECTORY)
|
get_filename_component(GIT_WORKTREE_PARENT "${GIT_WORKTREE_DIR}" DIRECTORY)
|
||||||
get_filename_component(GIT_WORKTREE_PARENT "${GIT_WORKTREE_PARENT}" NAME)
|
get_filename_component(GIT_WORKTREE_PARENT "${GIT_WORKTREE_PARENT}" NAME)
|
||||||
if ("${GIT_WORKTREE_PARENT}" STREQUAL "modules")
|
if(NOT EXISTS ${SUBMODULE_DIR_NAME})
|
||||||
|
set(SUBMODULE_DIR_NAME modules)
|
||||||
|
endif()
|
||||||
|
if ("${GIT_WORKTREE_PARENT}" STREQUAL "${SUBMODULE_DIR_NAME}")
|
||||||
# Z3 is a git submodule
|
# Z3 is a git submodule
|
||||||
set(GIT_HEAD_FILE "${Z3_SOURCE_DIR}/${GIT_HEAD_FILE}")
|
set(GIT_HEAD_FILE "${Z3_SOURCE_DIR}/${GIT_HEAD_FILE}")
|
||||||
set(GIT_DIR "${Z3_SOURCE_DIR}/${GIT_WORKTREE_DIR}")
|
set(GIT_DIR "${Z3_SOURCE_DIR}/${GIT_WORKTREE_DIR}")
|
||||||
|
|
Loading…
Reference in a new issue