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(FLANG_DOXYGEN_QCH_FILENAME "org.llvm.flang.qch" CACHE STRING
29 "Filename of the Qt Compressed help file")
30 set(FLANG_DOXYGEN_QHP_NAMESPACE "org.llvm.flang" CACHE STRING
31 "Namespace under which the intermediate Qt Help Project file lives")
32 set(FLANG_DOXYGEN_QHP_CUST_FILTER_NAME "FLANG ${FLANG_VERSION}" CACHE STRING
33 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
34 set(FLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS "FLANG,${FLANG_VERSION}" CACHE STRING
35 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
36 set(flang_doxygen_generate_qhp "YES")
37 set(flang_doxygen_qch_filename "${FLANG_DOXYGEN_QCH_FILENAME}")
38 set(flang_doxygen_qhp_namespace "${FLANG_DOXYGEN_QHP_NAMESPACE}")
39 set(flang_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
40 set(flang_doxygen_qhp_cust_filter_name "${FLANG_DOXYGEN_QHP_CUST_FILTER_NAME}")
41 set(flang_doxygen_qhp_cust_filter_attrs "${FLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
43 set(flang_doxygen_generate_qhp "NO")
44 set(flang_doxygen_qch_filename "")
45 set(flang_doxygen_qhp_namespace "")
46 set(flang_doxygen_qhelpgenerator_path "")
47 set(flang_doxygen_qhp_cust_filter_name "")
48 set(flang_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(flang_doxygen_generate_qhp)
71 set(flang_doxygen_qch_filename)
72 set(flang_doxygen_qhp_namespace)
73 set(flang_doxygen_qhelpgenerator_path)
74 set(flang_doxygen_qhp_cust_filter_name)
75 set(flang_doxygen_qhp_cust_filter_attrs)
78 add_custom_target(doxygen-flang
79 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
80 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
81 COMMENT "Generating flang doxygen documentation." VERBATIM)
84 add_dependencies(doxygen doxygen-flang)
87 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_DOCS)
88 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
89 DESTINATION docs/html)
94 if (LLVM_ENABLE_SPHINX)
95 include(AddSphinxTarget)
97 if (${SPHINX_OUTPUT_HTML})
98 add_sphinx_target(html flang)
100 if (${SPHINX_OUTPUT_MAN})
101 add_sphinx_target(man flang)