Mercurial > hg > CbC > CbC_llvm
comparison clang-tools-extra/docs/CMakeLists.txt @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
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}) | |
5 | |
6 if (HAVE_DOT) | |
7 set(DOT ${LLVM_PATH_DOT}) | |
8 endif() | |
9 | |
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() | |
23 | |
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() | |
48 | |
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() | |
56 | |
57 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in | |
58 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) | |
59 | |
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) | |
75 | |
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 | |
81 if (LLVM_BUILD_DOCS) | |
82 add_dependencies(doxygen doxygen-clang-tools) | |
83 endif() | |
84 | |
85 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | |
86 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html | |
87 DESTINATION docs/html) | |
88 endif() | |
89 endif() | |
90 endif() | |
91 | |
92 if (LLVM_ENABLE_SPHINX) | |
93 include(AddSphinxTarget) | |
94 if (SPHINX_FOUND) | |
95 if (${SPHINX_OUTPUT_HTML}) | |
96 add_sphinx_target(html clang-tools) | |
97 endif() | |
98 if (${SPHINX_OUTPUT_MAN}) | |
99 add_sphinx_target(man clang-tools) | |
100 endif() | |
101 endif() | |
102 endif() |