4 if (LLVM_ENABLE_DOXYGEN)
5 set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
6 set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
9 set(DOT ${LLVM_PATH_DOT})
12 if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
13 set(enable_searchengine "YES")
14 set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
15 set(enable_server_based_search "YES")
16 set(enable_external_search "YES")
17 set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
19 set(enable_searchengine "NO")
20 set(searchengine_url "")
21 set(enable_server_based_search "NO")
22 set(enable_external_search "NO")
23 set(extra_search_mappings "")
26 # If asked, configure doxygen for the creation of a Qt Compressed Help file.
27 if (LLVM_ENABLE_DOXYGEN_QT_HELP)
28 set(BOLT_DOXYGEN_QCH_FILENAME "org.llvm.bolt.qch" CACHE STRING
29 "Filename of the Qt Compressed help file")
30 set(BOLT_DOXYGEN_QHP_NAMESPACE "org.llvm.bolt" CACHE STRING
31 "Namespace under which the intermediate Qt Help Project file lives")
32 set(BOLT_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${BOLT_VERSION}" CACHE STRING
33 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
34 set(BOLT_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${BOLT_VERSION}" CACHE STRING
35 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
36 set(bolt_doxygen_generate_qhp "YES")
37 set(bolt_doxygen_qch_filename "${BOLT_DOXYGEN_QCH_FILENAME}")
38 set(bolt_doxygen_qhp_namespace "${BOLT_DOXYGEN_QHP_NAMESPACE}")
39 set(bolt_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
40 set(bolt_doxygen_qhp_cust_filter_name "${BOLT_DOXYGEN_QHP_CUST_FILTER_NAME}")
41 set(bolt_doxygen_qhp_cust_filter_attrs "${BOLT_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
43 set(bolt_doxygen_generate_qhp "NO")
44 set(bolt_doxygen_qch_filename "")
45 set(bolt_doxygen_qhp_namespace "")
46 set(bolt_doxygen_qhelpgenerator_path "")
47 set(bolt_doxygen_qhp_cust_filter_name "")
48 set(bolt_doxygen_qhp_cust_filter_attrs "")
51 option(LLVM_DOXYGEN_SVG
52 "Use svg instead of png files for doxygen graphs." OFF)
54 set(DOT_IMAGE_FORMAT "svg")
56 set(DOT_IMAGE_FORMAT "png")
59 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
60 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
65 set(enable_searchengine)
67 set(enable_server_based_search)
68 set(enable_external_search)
69 set(extra_search_mappings)
70 set(bolt_doxygen_generate_qhp)
71 set(bolt_doxygen_qch_filename)
72 set(bolt_doxygen_qhp_namespace)
73 set(bolt_doxygen_qhelpgenerator_path)
74 set(bolt_doxygen_qhp_cust_filter_name)
75 set(bolt_doxygen_qhp_cust_filter_attrs)
78 add_custom_target(doxygen-bolt
79 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
80 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
81 COMMENT "Generating bolt doxygen documentation." VERBATIM)
82 set_target_properties(doxygen-bolt PROPERTIES FOLDER "BOLT/Docs")
85 add_dependencies(doxygen doxygen-bolt)
88 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_DOCS)
89 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
90 DESTINATION docs/html)
95 if (LLVM_ENABLE_SPHINX)
96 include(AddSphinxTarget)
98 if (${SPHINX_OUTPUT_HTML})
99 add_sphinx_target(html bolt)