3
0
Fork 0
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:
Asger Gitz-Johansen 2021-01-23 22:05:28 +01:00 committed by GitHub
parent 47cb1d1207
commit 2d1684bc2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,10 @@ function(add_git_dir_dependency GIT_DOT_FILE SUCCESS_VAR)
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_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
set(GIT_HEAD_FILE "${Z3_SOURCE_DIR}/${GIT_HEAD_FILE}")
set(GIT_DIR "${Z3_SOURCE_DIR}/${GIT_WORKTREE_DIR}")