[AA] Rename CaptureInfo -> CaptureAnalysis (NFC) (#116842)
[llvm-project.git] / polly / docs / CMakeLists.txt
blob2bd16e53c542f6b9294a80f599152096962f41d5
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(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}")
40   else()
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 "")
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(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)
74   set(DOT_IMAGE_FORMAT)
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)
80   set_target_properties(doxygen-polly PROPERTIES FOLDER "Polly/Docs")
82   if (LLVM_BUILD_DOCS)
83     add_dependencies(doxygen doxygen-polly)
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 polly)
98     endif()
99     if (${SPHINX_OUTPUT_MAN})
100       add_sphinx_target(man polly)
101     endif()
102   endif()
103 endif()