From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: [PATCH v2 1/4] cmake: support SKIP_DASHED_BUILT_INS
Date: Mon, 29 Mar 2021 12:41:42 +0000 [thread overview]
Message-ID: <ff7e8121d7a47e318954c2c115f281b56f8be21f.1617021705.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.887.v2.git.1617021705.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
---
contrib/buildsystems/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index c151dd7257f3..12c40a72bfff 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
--
gitgitgadget
next prev parent reply other threads:[~2021-03-29 12:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 23:06 [PATCH 0/4] cmake: learn to optionally skip linking dashed built-ins Johannes Schindelin via GitGitGadget
2021-03-27 23:06 ` [PATCH 1/4] cmake: support SKIP_DASHED_BUILT_INS Johannes Schindelin via GitGitGadget
2021-03-27 23:06 ` [PATCH 2/4] cmake(install): fix double .exe suffixes Dennis Ameling via GitGitGadget
2021-03-27 23:06 ` [PATCH 3/4] cmake: add a preparatory work-around to accommodate `vcpkg` Johannes Schindelin via GitGitGadget
2021-03-28 3:19 ` Đoàn Trần Công Danh
2021-03-29 13:36 ` Johannes Schindelin
2021-03-27 23:06 ` [PATCH 4/4] cmake(install): include vcpkg dlls Dennis Ameling via GitGitGadget
2021-03-29 12:41 ` [PATCH v2 0/4] cmake: learn to optionally skip linking dashed built-ins Johannes Schindelin via GitGitGadget
2021-03-29 12:41 ` Johannes Schindelin via GitGitGadget [this message]
2021-03-29 12:41 ` [PATCH v2 2/4] cmake(install): fix double .exe suffixes Dennis Ameling via GitGitGadget
2021-03-29 12:41 ` [PATCH v2 3/4] cmake: add a preparatory work-around to accommodate `vcpkg` Johannes Schindelin via GitGitGadget
2021-03-29 12:41 ` [PATCH v2 4/4] cmake(install): include vcpkg dlls Dennis Ameling via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff7e8121d7a47e318954c2c115f281b56f8be21f.1617021705.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=congdanhqx@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).