From b7cb63590731f4d87ca79fe688b01af36b51af72 Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Wed, 28 Aug 2013 20:28:32 +0000 Subject: [PATCH] [cmake] Created an aggregate doxygen target for generating doxygen documentation 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 --- cmake/config-ix.cmake | 9 +++++++++ docs/CMakeLists.txt | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 3bf75836f1c..3f57e23a6f3 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -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() diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 505b5dbe939..7f1a51f17a4 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -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}) @@ -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 -- 2.34.1