mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-29 07:14:12 +08:00

- Organize the documentation into "chapters". - Each chapter include many documentation pages, reference pages organized as modules, and a quick reference page. - The "Chapters" tree is created using the defgroup/ingroup mechanism, even for the documentation pages (i.e., .dox files for which I added an \eigenManualPage macro that we can switch between \page or \defgroup ). - Add a "General topics" entry for all pages that do not fit well in the previous "chapters". - The highlevel struture is managed by a new eigendoxy_layout.xml file. - remove the "index" and quite useless pages (namespace list, class hierarchy, member list, file list, etc.) - add the javascript search-engine. - add the "treeview" panel. - remove \tableofcontents (replace them by a custom \eigenAutoToc macro to be able to easily re-enable if needed). - add javascript to automatically generate a TOC from the h1/h2 tags of the current page, and put the TOC in the left side panel. - overload various javascript function generated by doxygen to: - remove the root of the treeview - remove links to section/subsection from the treeview - automatically expand the "Chapters" section - automatically expand the current section - adjust the height of the treeview to take into account the TOC - always use the default .css file, eigendoxy.css now only includes our modifications - use Doxyfile to specify our logo - remove cross references to unsupported modules (temporarily)
86 lines
2.9 KiB
CMake
86 lines
2.9 KiB
CMake
project(EigenDoc)
|
|
|
|
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
|
|
project(EigenDoc)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g1")
|
|
endif(CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
configure_file(
|
|
${Eigen_SOURCE_DIR}/unsupported/doc/Doxyfile.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported
|
|
)
|
|
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
|
)
|
|
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html
|
|
)
|
|
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html
|
|
)
|
|
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml
|
|
)
|
|
|
|
set(examples_targets "")
|
|
set(snippets_targets "")
|
|
|
|
add_definitions("-DEIGEN_MAKING_DOCS")
|
|
add_custom_target(all_examples)
|
|
|
|
add_subdirectory(examples)
|
|
add_subdirectory(special_examples)
|
|
add_subdirectory(snippets)
|
|
|
|
add_custom_target(
|
|
doc-eigen-prerequisites
|
|
ALL
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js
|
|
${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png
|
|
${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt
|
|
${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
add_custom_target(
|
|
doc-unsupported-prerequisites
|
|
ALL
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/eigendoxy_tabs.css
|
|
${Eigen_BINARY_DIR}/doc/html/unsupported/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/Eigen_Silly_Professor_64x64.png
|
|
${Eigen_BINARY_DIR}/doc/html/unsupported/
|
|
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
|
|
)
|
|
|
|
add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
|
|
add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
|
|
|
|
add_custom_target(doc ALL
|
|
COMMAND doxygen Doxyfile-unsupported
|
|
COMMAND doxygen
|
|
COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references
|
|
COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
|
|
COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
|
|
COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc
|
|
COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
|
|
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
|
|
|
add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)
|