git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] cmake: support SKIP_DASHED_BUILT_INS

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 27, 2021, 23:06 UTC
Message-ID
<ff7e8121d7a47e318954c2c115f281b56f8be21f.1616886386.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.887.git.1616886386.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
Previous: Johannes Schindelin via GitGitGadgetNext: Dennis Ameling via GitGitGadget
Message 2 of 12 in “cmake: learn to optionally skip linking dashed built-ins”
  1. 0/4 cmake: learn to optionally skip linking dashed built-insJohannes Schindelin via GitGitGadget, Mar 27, 2021
  2. 1/4 cmake: support SKIP_DASHED_BUILT_INSJohannes Schindelin via GitGitGadget, Mar 27, 2021
  3. 2/4 cmake(install): fix double .exe suffixesDennis Ameling via GitGitGadget, Mar 27, 2021
  4. 3/4 cmake: add a preparatory work-around to accommodate `vcpkg`Johannes Schindelin via GitGitGadget, Mar 27, 2021
  5. Đoàn Trần Công DanhMar 28, 2021
  6. Johannes SchindelinMar 29, 2021
  7. 4/4 cmake(install): include vcpkg dllsDennis Ameling via GitGitGadget, Mar 27, 2021
  8. 0/4 cmake: learn to optionally skip linking dashed built-insJohannes Schindelin via GitGitGadget, Mar 29, 2021
  9. 1/4 cmake: support SKIP_DASHED_BUILT_INSJohannes Schindelin via GitGitGadget, Mar 29, 2021
  10. 2/4 cmake(install): fix double .exe suffixesDennis Ameling via GitGitGadget, Mar 29, 2021
  11. 4/4 cmake(install): include vcpkg dllsDennis Ameling via GitGitGadget, Mar 29, 2021
  12. 3/4 cmake: add a preparatory work-around to accommodate `vcpkg`Johannes Schindelin via GitGitGadget, Mar 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.