From 9cc5a452706d3b909b994813728a6094644f34b4 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. llvm-svn: 189506 --- llvm/cmake/config-ix.cmake | 9 +++++++++ llvm/docs/CMakeLists.txt | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index 3bf75836f1c3..3f57e23a6f35 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/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/llvm/docs/CMakeLists.txt b/llvm/docs/CMakeLists.txt index 505b5dbe939a..7f1a51f17a43 100644 --- a/llvm/docs/CMakeLists.txt +++ b/llvm/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