96 lines · plain
1 2if (DOXYGEN_FOUND)3if (LLVM_ENABLE_DOXYGEN)4 set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})5 set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})6 7 if (HAVE_DOT)8 set(DOT ${LLVM_PATH_DOT})9 endif()10 11 if (LLVM_DOXYGEN_EXTERNAL_SEARCH)12 set(enable_searchengine "YES")13 set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")14 set(enable_server_based_search "YES")15 set(enable_external_search "YES")16 set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")17 else()18 set(enable_searchengine "NO")19 set(searchengine_url "")20 set(enable_server_based_search "NO")21 set(enable_external_search "NO")22 set(extra_search_mappings "")23 endif()24 25 # If asked, configure doxygen for the creation of a Qt Compressed Help file.26 if (LLVM_ENABLE_DOXYGEN_QT_HELP)27 set(OPENMP_DOXYGEN_QCH_FILENAME "org.llvm.openmp.qch" CACHE STRING28 "Filename of the Qt Compressed help file")29 set(OPENMP_DOXYGEN_QHP_NAMESPACE "org.llvm.openmp" CACHE STRING30 "Namespace under which the intermediate Qt Help Project file lives")31 set(OPENMP_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${OPENMP_VERSION}" CACHE STRING32 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")33 set(OPENMP_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${OPENMP_VERSION}" CACHE STRING34 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")35 set(openmp_doxygen_generate_qhp "YES")36 set(openmp_doxygen_qch_filename "${OPENMP_DOXYGEN_QCH_FILENAME}")37 set(openmp_doxygen_qhp_namespace "${OPENMP_DOXYGEN_QHP_NAMESPACE}")38 set(openmp_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")39 set(openmp_doxygen_qhp_cust_filter_name "${OPENMP_DOXYGEN_QHP_CUST_FILTER_NAME}")40 set(openmp_doxygen_qhp_cust_filter_attrs "${OPENMP_DOXYGEN_QHP_CUST_FILTER_ATTRS}")41 else()42 set(openmp_doxygen_generate_qhp "NO")43 set(openmp_doxygen_qch_filename "")44 set(openmp_doxygen_qhp_namespace "")45 set(openmp_doxygen_qhelpgenerator_path "")46 set(openmp_doxygen_qhp_cust_filter_name "")47 set(openmp_doxygen_qhp_cust_filter_attrs "")48 endif()49 50 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in51 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)52 53 set(abs_top_srcdir)54 set(abs_top_builddir)55 set(DOT)56 set(enable_searchengine)57 set(searchengine_url)58 set(enable_server_based_search)59 set(enable_external_search)60 set(extra_search_mappings)61 set(openmp_doxygen_generate_qhp)62 set(openmp_doxygen_qch_filename)63 set(openmp_doxygen_qhp_namespace)64 set(openmp_doxygen_qhelpgenerator_path)65 set(openmp_doxygen_qhp_cust_filter_name)66 set(openmp_doxygen_qhp_cust_filter_attrs)67 68 add_custom_target(doxygen-openmp69 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg70 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}71 COMMENT "Generating openmp doxygen documentation." VERBATIM)72 set_target_properties(doxygen-openmp PROPERTIES FOLDER "OpenMP/Docs")73 74 if (LLVM_BUILD_DOCS)75 add_dependencies(doxygen doxygen-openmp)76 endif()77 78 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)79 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html80 DESTINATION docs/html)81 endif()82endif()83endif()84 85if (LLVM_ENABLE_SPHINX)86 include(AddSphinxTarget)87 if (SPHINX_FOUND)88 if (${SPHINX_OUTPUT_HTML})89 add_sphinx_target(html openmp)90 endif()91 if (${SPHINX_OUTPUT_MAN})92 add_sphinx_target(man openmp)93 endif()94 endif()95endif()96