summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJared Van Bortel <jared@nomic.ai>2023-11-30 17:23:08 -0500
committerGitHub <noreply@github.com>2023-12-01 00:23:08 +0200
commit15f5d96037e597523b721aa39c874d69de2acf85 (patch)
tree2147a158423feb7866197354a5a8aa6df7c9592f /common
parent33c9892af58b7b161f2a532935dcccff8c8048c6 (diff)
build : fix build info generation and cleanup Makefile (#3920)
* cmake : fix joining of REAL_GIT_DIR * fix includes with help from include-what-you-use * make : remove unneeded deps and add test-rope target * fix C includes in C++ source files * Revert "fix includes with help from include-what-you-use" This reverts commit 635e9fadfd516d4604a0fecf4a854bfb25ad17ae.
Diffstat (limited to 'common')
-rw-r--r--common/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 71891edc..b5d5453d 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -11,7 +11,12 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../.git")
if(NOT IS_DIRECTORY "${GIT_DIR}")
file(READ ${GIT_DIR} REAL_GIT_DIR_LINK)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" REAL_GIT_DIR ${REAL_GIT_DIR_LINK})
- set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${REAL_GIT_DIR}")
+ string(FIND "${REAL_GIT_DIR}" "/" SLASH_POS)
+ if (SLASH_POS EQUAL 0)
+ set(GIT_DIR "${REAL_GIT_DIR}")
+ else()
+ set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${REAL_GIT_DIR}")
+ endif()
endif()
set(GIT_INDEX "${GIT_DIR}/index")