Skip to content

Commit f25823b

Browse files
committed
cmake: stop trying to build the reftable and xdiff libraries
In the `en/make-libgit-a` topic branch, more precisely in the commits f3b4c89 (make: delete REFTABLE_LIB, add reftable to LIB_OBJS, 2025-10-02) and cf680cd (make: delete XDIFF_LIB, add xdiff to LIB_OBJS, 2025-10-02), the strategy to build three static libraries was rethought, and instead only one static library is now built. This is good. However, the CMake definition was not changed accordingly, and now CMake-based builds fail thusly: [...] Generating hook-list.h CMake Error at CMakeLists.txt:122 (string): string sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:711 (parse_makefile_for_sources) CMake Error at CMakeLists.txt:122 (string): string sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:717 (parse_makefile_for_sources) -- Configuring incomplete, errors occurred! Fix that by removing the parts that expect the reftable and xdiff objects to be defined separately in the Makefile, still. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b9736c7 commit f25823b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -707,18 +707,6 @@ list(APPEND libgit_SOURCES "${CMAKE_BINARY_DIR}/version-def.h")
707707

708708
add_library(libgit ${libgit_SOURCES} ${compat_SOURCES})
709709

710-
#libxdiff
711-
parse_makefile_for_sources(libxdiff_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "XDIFF_OBJS")
712-
713-
list(TRANSFORM libxdiff_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
714-
add_library(xdiff STATIC ${libxdiff_SOURCES})
715-
716-
#reftable
717-
parse_makefile_for_sources(reftable_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "REFTABLE_OBJS")
718-
719-
list(TRANSFORM reftable_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
720-
add_library(reftable STATIC ${reftable_SOURCES})
721-
722710
if(WIN32)
723711
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.rc
724712
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN"
@@ -748,7 +736,7 @@ endif()
748736
#link all required libraries to common-main
749737
add_library(common-main OBJECT ${CMAKE_SOURCE_DIR}/common-main.c)
750738

751-
target_link_libraries(common-main libgit xdiff reftable ${ZLIB_LIBRARIES})
739+
target_link_libraries(common-main libgit ${ZLIB_LIBRARIES})
752740
if(Intl_FOUND)
753741
target_link_libraries(common-main ${Intl_LIBRARIES})
754742
endif()

0 commit comments

Comments
 (0)