Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doxygen target using cmake-generated doxyfile #4700

Merged
merged 9 commits into from
Sep 24, 2024
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,7 @@ message(STATUS "Ready to parse QMCPACK source tree")

add_subdirectory(external_codes)
add_subdirectory(src)
add_subdirectory(doxygen)

if(NOT QMC_BUILD_SANDBOX_ONLY)
if(NOT QMC_NO_SLOW_CUSTOM_TESTING_COMMANDS)
Expand Down
15 changes: 15 additions & 0 deletions doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
find_package(Doxygen)
if(${DOXYGEN_FOUND})
PhilipFackler marked this conversation as resolved.
Show resolved Hide resolved
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${PROJECT_SOURCE_DIR}/README.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to remove this, since it gives a very strange first page.

Can you modify the config here so that it gives an accessible start page like https://docs.qmcpack.org/doxygen/doxy/index.html ?
The one produced by this PR has a long function(?) list before the classes and files browser.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prckent I believe the issue was with the navigation tree on the left. I like using the README since it gives links to all the relevant things on the web. I addressed the navigation tree issues (and in my opinion it's more useful than the tree in the current published version). Let me know what you think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that if you don't want to see the main page headings in the navigation, they can be removed with:
set(DOXYGEN_TOC_INCLUDE_HEADINGS 0)

set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_TEMPLATE_RELATIONS YES)
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_SOURCE_BROWSER YES)
set(DOXYGEN_INTERACTIVE_SVG YES)
set(DOXYGEN_DISTRIBUTE_GROUP_DOC YES)

doxygen_add_docs(qmcpack_doxygen ${PROJECT_SOURCE_DIR}/src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer

    doxygen_add_docs(qmcpack_doxygen ${PROJECT_SOURCE_DIR}/src)
else()
    message(STATUS "The qmcpack_doxygen target for the QMCPACK developer/API documentation requires (1) doxygen and (2) dot from graphviz.")
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a message to similar effect

${PROJECT_SOURCE_DIR}/README.md)
endif()