cmake: update verbiage on feature enablement

This commit is contained in:
Edward Thomson
2024-12-31 11:42:35 +00:00
parent bab249d82e
commit 94d8883dcf
6 changed files with 16 additions and 16 deletions

View File

@@ -42,12 +42,12 @@ if(GIT_COMPRESSION_ZLIB)
else()
list(APPEND LIBGIT2_PC_REQUIRES "zlib")
endif()
add_feature_info(compression ON "using system zlib")
add_feature_info("Compression" ON "using system zlib")
elseif(GIT_COMPRESSION_BUILTIN)
add_subdirectory("${PROJECT_SOURCE_DIR}/deps/zlib" "${PROJECT_BINARY_DIR}/deps/zlib")
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/zlib")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS $<TARGET_OBJECTS:zlib>)
add_feature_info(compression ON "using bundled zlib")
add_feature_info("Compression" ON "using bundled zlib")
else()
message(FATAL_ERROR "unknown compression backend")
endif()

View File

@@ -7,7 +7,7 @@ if(USE_HTTP_PARSER STREQUAL "http-parser" OR USE_HTTP_PARSER STREQUAL "system")
list(APPEND LIBGIT2_SYSTEM_LIBS ${HTTP_PARSER_LIBRARIES})
list(APPEND LIBGIT2_PC_LIBS "-lhttp_parser")
set(GIT_HTTPPARSER_HTTPPARSER 1)
add_feature_info(http-parser ON "using http-parser (system)")
add_feature_info("HTTP Parser" ON "using system http-parser")
else()
message(FATAL_ERROR "http-parser support was requested but not found")
endif()
@@ -19,7 +19,7 @@ elseif(USE_HTTP_PARSER STREQUAL "llhttp")
list(APPEND LIBGIT2_SYSTEM_LIBS ${LLHTTP_LIBRARIES})
list(APPEND LIBGIT2_PC_LIBS "-lllhttp")
set(GIT_HTTPPARSER_LLHTTP 1)
add_feature_info(http-parser ON "using llhttp (system)")
add_feature_info("HTTP Parser" ON "using system llhttp")
else()
message(FATAL_ERROR "llhttp support was requested but not found")
endif()
@@ -28,7 +28,7 @@ elseif(USE_HTTP_PARSER STREQUAL "" OR USE_HTTP_PARSER STREQUAL "builtin")
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/llhttp")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$<TARGET_OBJECTS:llhttp>")
set(GIT_HTTPPARSER_BUILTIN 1)
add_feature_info(http-parser ON "using bundled parser")
add_feature_info("HTTP Parser" ON "using bundled parser")
else()
message(FATAL_ERROR "unknown http-parser: ${USE_HTTP_PARSER}")
endif()

View File

@@ -33,8 +33,8 @@ if(USE_I18N)
set(GIT_I18N 1)
set(GIT_I18N_ICONV 1)
add_feature_info(i18n ON "using ${USE_I18N}")
add_feature_info("Internationalization" ON "using ${USE_I18N}")
else()
set(GIT_I18N 0)
add_feature_info(i18n NO "internationalization support is disabled")
add_feature_info("Internationalization" OFF "internationalization support is disabled")
endif()

View File

@@ -27,7 +27,7 @@ if(NOT USE_REGEX)
endif()
if(USE_REGEX STREQUAL "regcomp_l")
add_feature_info(regex ON "using system regcomp_l")
add_feature_info("Regular expressions" ON "using system regcomp_l")
set(GIT_REGEX_REGCOMP_L 1)
elseif(USE_REGEX STREQUAL "pcre2")
find_package(PCRE2)
@@ -36,24 +36,24 @@ elseif(USE_REGEX STREQUAL "pcre2")
MESSAGE(FATAL_ERROR "PCRE2 support was requested but not found")
endif()
add_feature_info(regex ON "using system PCRE2")
add_feature_info("Regular expressions" ON "using system PCRE2")
set(GIT_REGEX_PCRE2 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${PCRE2_INCLUDE_DIRS})
list(APPEND LIBGIT2_SYSTEM_LIBS ${PCRE2_LIBRARIES})
list(APPEND LIBGIT2_PC_REQUIRES "libpcre2-8")
elseif(USE_REGEX STREQUAL "pcre")
add_feature_info(regex ON "using system PCRE")
add_feature_info("Regular expressions" ON "using system PCRE")
set(GIT_REGEX_PCRE 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${PCRE_INCLUDE_DIRS})
list(APPEND LIBGIT2_SYSTEM_LIBS ${PCRE_LIBRARIES})
list(APPEND LIBGIT2_PC_REQUIRES "libpcre")
elseif(USE_REGEX STREQUAL "regcomp")
add_feature_info(regex ON "using system regcomp")
add_feature_info("Regular expressions" ON "using system regcomp")
set(GIT_REGEX_REGCOMP 1)
elseif(USE_REGEX STREQUAL "builtin")
add_feature_info(regex ON "using builtin")
add_feature_info("Regular expressions" ON "using bundled implementation")
set(GIT_REGEX_BUILTIN 1)
add_subdirectory("${PROJECT_SOURCE_DIR}/deps/pcre" "${PROJECT_BINARY_DIR}/deps/pcre")

View File

@@ -5,7 +5,7 @@ else()
add_subdirectory("${PROJECT_SOURCE_DIR}/deps/xdiff" "${PROJECT_BINARY_DIR}/deps/xdiff")
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/xdiff")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$<TARGET_OBJECTS:xdiff>")
add_feature_info(xdiff ON "xdiff support (bundled)")
add_feature_info("Xdiff" ON "using bundled provider")
else()
message(FATAL_ERROR "asked for unknown Xdiff backend: ${USE_XDIFF}")
endif()

View File

@@ -20,17 +20,17 @@ endif()
if(DEBUG_POOL)
set(GIT_DEBUG_POOL 1)
endif()
add_feature_info(debugpool GIT_DEBUG_POOL "debug pool allocator")
add_feature_info("Debug pool" GIT_DEBUG_POOL "debug-mode struct pool allocators")
if(DEBUG_STRICT_ALLOC)
set(GIT_DEBUG_STRICT_ALLOC 1)
endif()
add_feature_info(debugalloc GIT_DEBUG_STRICT_ALLOC "debug strict allocators")
add_feature_info("Debug alloc" GIT_DEBUG_STRICT_ALLOC "debug-mode strict allocators")
if(DEBUG_STRICT_OPEN)
set(GIT_DEBUG_STRICT_OPEN 1)
endif()
add_feature_info(debugopen GIT_DEBUG_STRICT_OPEN "path validation in open")
add_feature_info("Debug open" GIT_DEBUG_STRICT_OPEN "strict path validation in open")
#
# Optional feature enablement