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

exclude ${PROJECT_NAME}-doc from ALL #703

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -518,26 +518,32 @@ macro(_SETUP_PROJECT_DOCUMENTATION)
endif(DOXYGEN_DOT_FOUND)

# Teach CMake how to generate the documentation.
if(NOT TARGET doc)
add_custom_target(doc ALL COMMENT "Generating Doxygen documentation")
endif()
if(MSVC)
# FIXME: it is impossible to trigger documentation installation at
# install, so put the target in ALL instead.
if(NOT TARGET doc)
add_custom_target(doc ALL COMMENT "Generating Doxygen documentation")
endif()
add_custom_target(
${PROJECT_NAME}-doc
COMMAND ${DOXYGEN_EXECUTABLE} ${JRL_CMAKEMODULE_DOXYFILE_PATH}
WORKING_DIRECTORY doc
COMMENT "Generating Doxygen documentation")
else(MSVC)
if(NOT TARGET doc)
add_custom_target(doc COMMENT "Generating Doxygen documentation")
endif()

add_custom_target(
${PROJECT_NAME}-doc
COMMAND ${DOXYGEN_EXECUTABLE} ${JRL_CMAKEMODULE_DOXYFILE_PATH}
WORKING_DIRECTORY doc
COMMENT "Generating Doxygen documentation")

if(INSTALL_DOCUMENTATION)
install(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_MAKE_PROGRAM} doc)")
install(
CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_MAKE_PROGRAM} ${PROJECT_NAME}-doc)"
)
endif(INSTALL_DOCUMENTATION)
endif(MSVC)
add_dependencies(doc ${PROJECT_NAME}-doc)
Expand Down
Loading