Merge def47780cc
into cf32a9b93a
This commit is contained in:
commit
3427a47259
4 changed files with 2641 additions and 0 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -134,3 +134,9 @@ poetry.toml
|
||||||
|
|
||||||
# Test models for lora adapters
|
# Test models for lora adapters
|
||||||
/lora-tests
|
/lora-tests
|
||||||
|
|
||||||
|
# Ignore all files in docs-api
|
||||||
|
docs-api/*
|
||||||
|
# Except Doxyfile and CMakeLists.txt
|
||||||
|
!docs-api/Doxyfile
|
||||||
|
!docs-api/CMakeLists.txt
|
||||||
|
|
|
@ -73,6 +73,9 @@ option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
|
||||||
# 3rd party libs
|
# 3rd party libs
|
||||||
option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF)
|
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
|
# Required for relocatable CMake package
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
|
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(examples)
|
||||||
add_subdirectory(pocs)
|
add_subdirectory(pocs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LLAMA_DOCS)
|
||||||
|
add_subdirectory(docs-api)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
13
docs-api/CMakeLists.txt
Normal file
13
docs-api/CMakeLists.txt
Normal 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
2614
docs-api/Doxyfile
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue