From: Junio C Hamano <gitster@pobox.com>
To: "Yuyi Wang via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>,
Yuyi Wang <Strawberry_Str@hotmail.com>
Subject: Re: [PATCH v2 1/2] Fix CMakeLists.txt on Linux.
Date: Tue, 24 May 2022 16:04:43 -0700 [thread overview]
Message-ID: <xmqqtu9ecz1w.fsf@gitster.g> (raw)
In-Reply-To: <29cb31e5c502149192c6beb56bf8b372a40711e0.1653374328.git.gitgitgadget@gmail.com> (Yuyi Wang via GitGitGadget's message of "Tue, 24 May 2022 06:38:47 +0000")
"Yuyi Wang via GitGitGadget" <gitgitgadget@gmail.com> writes:
> Subject: Re: [PATCH v2 1/2] Fix CMakeLists.txt on Linux.
Perhaps
Subject: cmake: fix CMakeLists on Linux
i.e. with a short and meaningful <area>: prefix, no need to
capitalize the first word after the prefix, without the terminating
full-stop.
From: Yuyi Wang <Strawberry_Str@hotmail.com>
>
> CMakeLists.txt didn't follow the grammar of `set`, and it will fail when
> setting `USE_VCPKG` off on non-Windows platforms.
So any non-Windows, the use of set() here was broken. It is
understandable because cmake support was added primarily for
Windows. It is nevertheless good to see it corrected.
> When the platform is Linux, the Makefile adds `compat/linux/procinfo.o`
> to `COMPAT_OBJS`, but the CMakeLists.txt didn't add
> `compat/linux/procinfo.c` to `compat_SOURCES`. It would cause linkage
> error.
OK. I didn't know anybody cared about using cmake on non-Windows
platforms for this project.
Thanks, will queue, together with the other two patches.
> Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>
> ---
> contrib/buildsystems/CMakeLists.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index 185f56f414f..7f333e303c2 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -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)
> @@ -277,7 +277,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")
next prev parent reply other threads:[~2022-05-24 23:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 3:58 [PATCH] Add pcre2 support for cmake build system Yuyi Wang via GitGitGadget
2022-05-18 22:02 ` Junio C Hamano
2022-05-19 16:18 ` Yuyi Wang
2022-05-23 18:35 ` Derrick Stolee
2022-05-23 18:36 ` Derrick Stolee
2022-05-24 6:38 ` [PATCH v2 0/2] " Yuyi Wang via GitGitGadget
2022-05-24 6:38 ` [PATCH v2 1/2] Fix CMakeLists.txt on Linux Yuyi Wang via GitGitGadget
2022-05-24 23:04 ` Junio C Hamano [this message]
2022-05-24 6:38 ` [PATCH v2 2/2] Add pcre2 support for cmake build system Yuyi Wang 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=xmqqtu9ecz1w.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Strawberry_Str@hotmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.