This commit is contained in:
Junil Kim 2024-11-17 23:04:07 +13:00 committed by GitHub
commit 3427a47259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 2641 additions and 0 deletions

6
.gitignore vendored
View file

@ -134,3 +134,9 @@ poetry.toml
# Test models for lora adapters
/lora-tests
# Ignore all files in docs-api
docs-api/*
# Except Doxyfile and CMakeLists.txt
!docs-api/Doxyfile
!docs-api/CMakeLists.txt

View file

@ -73,6 +73,9 @@ option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
# 3rd party libs
option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF)
# doxygen documentation
option(LLAMA_DOCS "Build documentation" OFF)
# Required for relocatable CMake package
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
@ -213,3 +216,8 @@ if (LLAMA_BUILD_COMMON AND LLAMA_BUILD_EXAMPLES)
add_subdirectory(examples)
add_subdirectory(pocs)
endif()
if(LLAMA_DOCS)
add_subdirectory(docs-api)
endif()

13
docs-api/CMakeLists.txt Normal file
View file

@ -0,0 +1,13 @@
find_package(Doxygen)
if (DOXYGEN_FOUND)
message("Doxygen found. Generating documentation...")
add_custom_target(doc ALL
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM
)
else ()
message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it.")
endif ()

2614
docs-api/Doxyfile Normal file

File diff suppressed because it is too large Load diff