[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)
[llvm-project.git] / bolt / docs / CMakeLists.txt
blob12ae852566785f3a82962079a8239cb761faa6e1
2 find_package(Doxygen)
3 if (DOXYGEN_FOUND)
4 if (LLVM_ENABLE_DOXYGEN)
5   set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
6   set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
8   if (HAVE_DOT)
9     set(DOT ${LLVM_PATH_DOT})
10   endif()
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}")
18   else()
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 "")
24   endif()
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}")
42   else()
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 "")
49   endif()
51   option(LLVM_DOXYGEN_SVG
52     "Use svg instead of png files for doxygen graphs." OFF)
53   if (LLVM_DOXYGEN_SVG)
54     set(DOT_IMAGE_FORMAT "svg")
55   else()
56     set(DOT_IMAGE_FORMAT "png")
57   endif()
59   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
60     ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
62   set(abs_top_srcdir)
63   set(abs_top_builddir)
64   set(DOT)
65   set(enable_searchengine)
66   set(searchengine_url)
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)
76   set(DOT_IMAGE_FORMAT)
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")
84   if (LLVM_BUILD_DOCS)
85     add_dependencies(doxygen doxygen-bolt)
86   endif()
88   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_DOCS)
89     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
90       DESTINATION docs/html)
91   endif()
92 endif()
93 endif()
95 if (LLVM_ENABLE_SPHINX)
96   include(AddSphinxTarget)
97   if (SPHINX_FOUND)
98     if (${SPHINX_OUTPUT_HTML})
99       add_sphinx_target(html bolt)
100     endif()
101   endif()
102 endif()