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

Re: [PATCH] Add pcre2 support for cmake build system.

From
Yuyi Wang <strawberry_str@hotmail.com>
Date
May 19, 2022, 16:18 UTC
Message-ID
<OSYP286MB02627C53ECF2C03B397556E3F8D09@OSYP286MB0262.JPNP286.PROD.OUTLOOK.COM>
In-Reply-To
<xmqq1qwqts6w.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Is this "small fix to ensure it builds successfully"?  To those who
> do not need/want to use pcre2, is this hunk still needed to "build
> successfully", or is this something that becomes necessary only
> because we have other hunks in this patch to add support to pcre2?
> 
> If the former, then perhaps the change deserves to be its own patch
> with own explanation why it is necessary, what breaks without it,
> etc.

There are 2 fixes. They are all needed no matter pcre2 is wanted. I'm rather surprised that no one has noticed the CMakeLists.txt is broken.

Show 9 quoted lines
> @@ -54,7 +54,7 @@ set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
>  
>  option(USE_VCPKG "Whether or not to use vcpkg for obtaining dependencies.  Only applicable to Windows platforms" ON)
>  if(NOT WIN32)
> -	set(USE_VCPKG OFF CACHE BOOL FORCE)
> +	set(USE_VCPKG OFF CACHE BOOL "" FORCE)
>  endif()
>  
>  if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS)

This is the first fix. The original line didn't follow the grammar of `set`, and would simply fail.

Show 9 quoted lines
> @@ -277,7 +287,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
>  
>  elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
>  	add_compile_definitions(PROCFS_EXECUTABLE_PATH="/proc/self/exe" HAVE_DEV_TTY )
> -	list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c)
> +	list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c compat/linux/procinfo.c)
>  endif()
>  
>  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
This is the second fix, to solve the linkage error on Linux.

You're right, Junio. These fixes should be their own patch. Should I remove them? They are still small fixes, I think, and could I submit the two together in a new patch?

Previous: Junio C HamanoNext: Derrick Stolee
Message 3 of 9 in “Add pcre2 support for cmake build system.”
  1. Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 18, 2022
  2. Junio C HamanoMay 18, 2022
  3. Yuyi WangMay 19, 2022
  4. Derrick StoleeMay 23, 2022
  5. Derrick StoleeMay 23, 2022
  6. 0/2 Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 24, 2022
  7. 1/2 Fix CMakeLists.txt on Linux.Yuyi Wang via GitGitGadget, May 24, 2022
  8. Junio C HamanoMay 24, 2022
  9. 2/2 Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 24, 2022

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.