[JITLink][arm64] Support arm64e JIT'd code (initially enabled for MachO only).
[llvm-project.git] / clang-tools-extra / docs / CMakeLists.txt
blob272db266b5054620af9d51aaaea8018eda691f0a
1 if (DOXYGEN_FOUND)
2   if (LLVM_ENABLE_DOXYGEN)
3     set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
4     set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
6     if (HAVE_DOT)
7       set(DOT ${LLVM_PATH_DOT})
8     endif()
10     if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
11       set(enable_searchengine "YES")
12       set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
13       set(enable_server_based_search "YES")
14       set(enable_external_search "YES")
15       set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
16     else()
17       set(enable_searchengine "NO")
18       set(searchengine_url "")
19       set(enable_server_based_search "NO")
20       set(enable_external_search "NO")
21       set(extra_search_mappings "")
22     endif()
24     # If asked, configure doxygen for the creation of a Qt Compressed Help file.
25     if (LLVM_ENABLE_DOXYGEN_QT_HELP)
26       set(CLANG_TOOLS_DOXYGEN_QCH_FILENAME "org.llvm.clang.qch" CACHE STRING
27         "Filename of the Qt Compressed help file")
28       set(CLANG_TOOLS_DOXYGEN_QHP_NAMESPACE "org.llvm.clang" CACHE STRING
29         "Namespace under which the intermediate Qt Help Project file lives")
30       set(CLANG_TOOLS_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${CLANG_VERSION}" CACHE STRING
31         "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
32       set(CLANG_TOOLS_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${CLANG_VERSION}" CACHE STRING
33         "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
34       set(clang_tools_doxygen_generate_qhp "YES")
35       set(clang_tools_doxygen_qch_filename "${CLANG_DOXYGEN_QCH_FILENAME}")
36       set(clang_tools_doxygen_qhp_namespace "${CLANG_DOXYGEN_QHP_NAMESPACE}")
37       set(clang_tools_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
38       set(clang_tools_doxygen_qhp_cust_filter_name "${CLANG_DOXYGEN_QHP_CUST_FILTER_NAME}")
39       set(clang_tools_doxygen_qhp_cust_filter_attrs "${CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
40     else()
41       set(clang_tools_doxygen_generate_qhp "NO")
42       set(clang_tools_doxygen_qch_filename "")
43       set(clang_tools_doxygen_qhp_namespace "")
44       set(clang_tools_doxygen_qhelpgenerator_path "")
45       set(clang_tools_doxygen_qhp_cust_filter_name "")
46       set(clang_tools_doxygen_qhp_cust_filter_attrs "")
47     endif()
49     option(LLVM_DOXYGEN_SVG
50       "Use svg instead of png files for doxygen graphs." OFF)
51     if (LLVM_DOXYGEN_SVG)
52       set(DOT_IMAGE_FORMAT "svg")
53     else()
54       set(DOT_IMAGE_FORMAT "png")
55     endif()
57     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
58       ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
60     set(abs_top_srcdir)
61     set(abs_top_builddir)
62     set(DOT)
63     set(enable_searchengine)
64     set(searchengine_url)
65     set(enable_server_based_search)
66     set(enable_external_search)
67     set(extra_search_mappings)
68     set(clang_tools_doxygen_generate_qhp)
69     set(clang_tools_doxygen_qch_filename)
70     set(clang_tools_doxygen_qhp_namespace)
71     set(clang_tools_doxygen_qhelpgenerator_path)
72     set(clang_tools_doxygen_qhp_cust_filter_name)
73     set(clang_tools_doxygen_qhp_cust_filter_attrs)
74     set(DOT_IMAGE_FORMAT)
76     add_custom_target(doxygen-clang-tools
77       COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
78       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
79       COMMENT "Generating clang doxygen documentation." VERBATIM)
80     set_target_properties(doxygen-clang-tools PROPERTIES FOLDER "Clang Tools Extra/Docs")
82     if (LLVM_BUILD_DOCS)
83       add_dependencies(doxygen doxygen-clang-tools)
84     endif()
86     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
87       install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
88         DESTINATION docs/html)
89     endif()
90   endif()
91 endif()
93 if (LLVM_ENABLE_SPHINX)
94   include(AddSphinxTarget)
95   if (SPHINX_FOUND)
96     if (${SPHINX_OUTPUT_HTML})
97       add_sphinx_target(html clang-tools)
98     endif()
99     if (${SPHINX_OUTPUT_MAN})
100       add_sphinx_target(man clang-tools)
101     endif()
102   endif()
103 endif()