[DOC] Add Doxygen documentation support (#362)

* [DOC] Add Doxygen documentationsupport

* minor fix

* remove LLVM_INCLUDE_DOCS and MLIR_INCLUDE_DOCS variable

* remove unnessary set(Dot dot)
This commit is contained in:
Shivam Gupta 2020-12-27 09:44:58 +05:30 committed by GitHub
parent f12e64f466
commit 9c1bbaef14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2562 additions and 5 deletions

View File

@ -186,11 +186,10 @@ add_subdirectory(tools)
add_subdirectory(test)
add_subdirectory(integration_test)
#option(CIRCT_INCLUDE_DOCS "Generate build targets for the CIRCT docs."
# ${LLVM_INCLUDE_DOCS} ${MLIR_INCLUDE_DOCS})
#if (CIRCT_INCLUDE_DOCS)
# add_subdirectory(docs)
#endif()
option(CIRCT_INCLUDE_DOCS "Generate build targets for the CIRCT docs.")
if (CIRCT_INCLUDE_DOCS)
add_subdirectory(docs)
endif()
install(DIRECTORY include/circt
DESTINATION include

20
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,20 @@
include(FindDoxygen)
if(DOXYGEN_FOUND)
set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(abs_top_builddir ..)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
add_custom_target(doxygen-circt
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating circt doxygen documentation." VERBATIM)
if (CIRCT_BUILD_DOCS)
add_dependencies(doxygen doxygen-circt)
endif()
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
DESTINATION docs/html)
endif()

16
docs/doxygen-mainpage.dox Normal file
View File

@ -0,0 +1,16 @@
/// @mainpage CIRCT
///
/// @section main_intro Introduction
/// Welcome to CIRCT.
///
/// This documentation describes both the private and public interface of CIRCT.
/// There are no instructions here on how to use CIRCT, only the APIs
/// that make up the software. For usage instructions, please see
/// the help command.
///
/// @section main_caveat Caveat
/// This documentation is generated directly from the source code with doxygen.
/// Since CIRCT is constantly under active development, what you're about to
/// read is out of date! However, it may still be useful since certain portions
/// of CIRCT are very stable.

2522
docs/doxygen.cfg.in Normal file

File diff suppressed because it is too large Load Diff