summaryrefslogtreecommitdiff
path: root/contrib/buildsystems/CMakeLists.txt
diff options
context:
space:
mode:
authorYuyi Wang <Strawberry_Str@hotmail.com>2022-05-24 06:38:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-05-24 23:05:00 (GMT)
commita561962479cc2c1063babeeaf0e6491fd4b8b2e8 (patch)
treebf7dd41bea5a60b52913fce1eb706b539175745a /contrib/buildsystems/CMakeLists.txt
parente54793a95afeea1e10de1e5ad7eab914e7416250 (diff)
downloadgit-a561962479cc2c1063babeeaf0e6491fd4b8b2e8.zip
git-a561962479cc2c1063babeeaf0e6491fd4b8b2e8.tar.gz
git-a561962479cc2c1063babeeaf0e6491fd4b8b2e8.tar.bz2
cmake: fix CMakeLists.txt on Linux
CMakeLists.txt didn't follow the grammar of `set`, and it will fail when setting `USE_VCPKG` off on non-Windows platforms. 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. Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems/CMakeLists.txt')
-rw-r--r--contrib/buildsystems/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 185f56f..7f333e3 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")