2 if (LLVM_ENABLE_DOXYGEN)
3 set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
4 set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
7 set(DOT ${LLVM_PATH_DOT})
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}")
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 "")
24 # If asked, configure doxygen for the creation of a Qt Compressed Help file.
25 if (LLVM_ENABLE_DOXYGEN_QT_HELP)
26 set(POLLY_DOXYGEN_QCH_FILENAME "org.llvm.polly.qch" CACHE STRING
27 "Filename of the Qt Compressed help file")
28 set(POLLY_DOXYGEN_QHP_NAMESPACE "org.llvm.polly" CACHE STRING
29 "Namespace under which the intermediate Qt Help Project file lives")
30 set(POLLY_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${POLLY_VERSION}" CACHE STRING
31 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
32 set(POLLY_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${POLLY_VERSION}" CACHE STRING
33 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
34 set(polly_doxygen_generate_qhp "YES")
35 set(polly_doxygen_qch_filename "${POLLY_DOXYGEN_QCH_FILENAME}")
36 set(polly_doxygen_qhp_namespace "${POLLY_DOXYGEN_QHP_NAMESPACE}")
37 set(polly_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
38 set(polly_doxygen_qhp_cust_filter_name "${POLLY_DOXYGEN_QHP_CUST_FILTER_NAME}")
39 set(polly_doxygen_qhp_cust_filter_attrs "${POLLY_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
41 set(polly_doxygen_generate_qhp "NO")
42 set(polly_doxygen_qch_filename "")
43 set(polly_doxygen_qhp_namespace "")
44 set(polly_doxygen_qhelpgenerator_path "")
45 set(polly_doxygen_qhp_cust_filter_name "")
46 set(polly_doxygen_qhp_cust_filter_attrs "")
49 option(LLVM_DOXYGEN_SVG
50 "Use svg instead of png files for doxygen graphs." OFF)
52 set(DOT_IMAGE_FORMAT "svg")
54 set(DOT_IMAGE_FORMAT "png")
57 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
58 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
63 set(enable_searchengine)
65 set(enable_server_based_search)
66 set(enable_external_search)
67 set(extra_search_mappings)
68 set(polly_doxygen_generate_qhp)
69 set(polly_doxygen_qch_filename)
70 set(polly_doxygen_qhp_namespace)
71 set(polly_doxygen_qhelpgenerator_path)
72 set(polly_doxygen_qhp_cust_filter_name)
73 set(polly_doxygen_qhp_cust_filter_attrs)
76 add_custom_target(doxygen-polly
77 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
78 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
79 COMMENT "Generating polly doxygen documentation." VERBATIM)
82 add_dependencies(doxygen doxygen-polly)
85 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
86 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
87 DESTINATION docs/html)
92 if (LLVM_ENABLE_SPHINX)
93 include(AddSphinxTarget)
95 if (${SPHINX_OUTPUT_HTML})
96 add_sphinx_target(html polly)
98 if (${SPHINX_OUTPUT_MAN})
99 add_sphinx_target(man polly)