Skip to content

Commit

Permalink
[cmake] Created an aggregate doxygen target for generating doxygen do…
Browse files Browse the repository at this point in the history
…cumentation for llvm/all subprojects. Renamed llvm's doxygen generation command to doxygen-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189506 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gottesmm committed Aug 28, 2013
1 parent 2957273 commit b7cb635
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,15 @@ set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX})
if (LLVM_ENABLE_DOXYGEN)
message(STATUS "Doxygen enabled.")
find_package(Doxygen)

if (DOXYGEN_FOUND)
# If we find doxygen and we want to enable doxygen by default create a
# global aggregate doxygen target for generating llvm and any/all
# subprojects doxygen documentation.
if (LLVM_BUILD_DOCS)
add_custom_target(doxygen ALL)
endif()
endif()
else()
message(STATUS "Doxygen disabled.")
endif()
12 changes: 6 additions & 6 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

if (LLVM_BUILD_DOCS)
set(LLVM_DOCS_ADD_TO_ALL ALL)
endif()

if (DOXYGEN_FOUND)
if (LLVM_ENABLE_DOXYGEN)
set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR})
Expand All @@ -18,10 +14,14 @@ if (LLVM_ENABLE_DOXYGEN)
set(abs_top_builddir)
set(DOT)

add_custom_target(doxygen ${LLVM_DOCS_ADD_TO_ALL}
add_custom_target(doxygen-llvm
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating doxygen documentation." VERBATIM)
COMMENT "Generating llvm doxygen documentation." VERBATIM)

if (LLVM_BUILD_DOCS)
add_dependencies(doxygen doxygen-llvm)
endif()

if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
Expand Down

0 comments on commit b7cb635

Please sign in to comment.