Files
libgit2/deps/reftable/CMakeLists.txt
Patrick Steinhardt 6701e02f1c refdb: implement reftable backend
Implement the reftable backend that is used to read and write reftables.
The backend is not yet used anywhere after this commit.
2026-04-16 14:56:46 +02:00

30 lines
1.0 KiB
CMake

add_library(reftable OBJECT ${SRC_REFTABLE})
disable_warnings(implicit-fallthrough)
file(GLOB SRC_REFTABLE "*.c" "*.h")
list(SORT SRC_REFTABLE)
set_property(TARGET reftable PROPERTY C_STANDARD 99)
target_sources(reftable PRIVATE ${SRC_REFTABLE})
target_include_directories(reftable PRIVATE
include
"${PROJECT_BINARY_DIR}/src/util"
"${PROJECT_BINARY_DIR}/include"
"${PROJECT_SOURCE_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/include"
${LIBGIT2_DEPENDENCY_INCLUDES}
${LIBGIT2_SYSTEM_INCLUDES}
)
# The reftable library is not warning-free, so we disable turning warnings into
# errors.
if(MSVC)
set_source_files_properties(block.c PROPERTIES COMPILE_FLAGS -WX-)
set_source_files_properties(blocksource.c PROPERTIES COMPILE_FLAGS -WX-)
set_source_files_properties(record.c PROPERTIES COMPILE_FLAGS -WX-)
set_source_files_properties(stack.c PROPERTIES COMPILE_FLAGS -WX-)
set_source_files_properties(table.c PROPERTIES COMPILE_FLAGS -WX-)
set_source_files_properties(writer.c PROPERTIES COMPILE_FLAGS -WX-)
endif()