diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-03-27 23:06:22 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-27 18:02:23 -0700 |
commit | 7bb544a4d13810c10d2c0fa1bfed336c7a31a4bc (patch) | |
tree | cc0691b970c1ce046dc63490dfbd0b24b3de048b /contrib/buildsystems/CMakeLists.txt | |
parent | Git 2.31.1 (diff) | |
download | tgif-7bb544a4d13810c10d2c0fa1bfed336c7a31a4bc.tar.xz |
cmake: support SKIP_DASHED_BUILT_INS
Just like the Makefile-based build learned to skip hard-linking the
dashed built-ins in 179227d6e21 (Optionally skip linking/copying the
built-ins, 2020-09-21), this patch teaches the CMake-based build the
same trick.
Note: In contrast to the Makefile-based process, the built-ins would
only be linked during installation, not already when Git is built.
Therefore, the CMake-based build that we use in our CI builds _already_
does not link those built-ins (because the files are not installed
anywhere, they are used to run the test suite in-place).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems/CMakeLists.txt')
-rw-r--r-- | contrib/buildsystems/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index ac3dbc079a..4683547489 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -685,13 +685,17 @@ endif() parse_makefile_for_executables(git_builtin_extra "BUILT_INS") +option(SKIP_DASHED_BUILT_INS "Skip hardlinking the dashed versions of the built-ins") + #Creating hardlinks +if(NOT SKIP_DASHED_BUILT_INS) foreach(s ${git_SOURCES} ${git_builtin_extra}) string(REPLACE "${CMAKE_SOURCE_DIR}/builtin/" "" s ${s}) string(REPLACE ".c" "" s ${s}) file(APPEND ${CMAKE_BINARY_DIR}/CreateLinks.cmake "file(CREATE_LINK git${EXE_EXTENSION} git-${s}${EXE_EXTENSION})\n") list(APPEND git_links ${CMAKE_BINARY_DIR}/git-${s}${EXE_EXTENSION}) endforeach() +endif() if(CURL_FOUND) set(remote_exes |