[debuginfo-tests][dexter] Add two new debug experience tests
[llvm-project.git] / flang / docs / CMakeLists.txt
blob8d2edc493ec21c969e7530f28f6f234546777435
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(FLANG_DOXYGEN_QCH_FILENAME "org.llvm.flang.qch" CACHE STRING
29       "Filename of the Qt Compressed help file")
30     set(FLANG_DOXYGEN_QHP_NAMESPACE "org.llvm.flang" CACHE STRING
31       "Namespace under which the intermediate Qt Help Project file lives")
32     set(FLANG_DOXYGEN_QHP_CUST_FILTER_NAME "FLANG ${FLANG_VERSION}" CACHE STRING
33       "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
34     set(FLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS "FLANG,${FLANG_VERSION}" CACHE STRING
35       "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
36     set(flang_doxygen_generate_qhp "YES")
37     set(flang_doxygen_qch_filename "${FLANG_DOXYGEN_QCH_FILENAME}")
38     set(flang_doxygen_qhp_namespace "${FLANG_DOXYGEN_QHP_NAMESPACE}")
39     set(flang_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
40     set(flang_doxygen_qhp_cust_filter_name "${FLANG_DOXYGEN_QHP_CUST_FILTER_NAME}")
41     set(flang_doxygen_qhp_cust_filter_attrs "${FLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
42   else()
43     set(flang_doxygen_generate_qhp "NO")
44     set(flang_doxygen_qch_filename "")
45     set(flang_doxygen_qhp_namespace "")
46     set(flang_doxygen_qhelpgenerator_path "")
47     set(flang_doxygen_qhp_cust_filter_name "")
48     set(flang_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(flang_doxygen_generate_qhp)
71   set(flang_doxygen_qch_filename)
72   set(flang_doxygen_qhp_namespace)
73   set(flang_doxygen_qhelpgenerator_path)
74   set(flang_doxygen_qhp_cust_filter_name)
75   set(flang_doxygen_qhp_cust_filter_attrs)
76   set(DOT_IMAGE_FORMAT)
78   add_custom_target(doxygen-flang
79     COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
80     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
81     COMMENT "Generating flang doxygen documentation." VERBATIM)
83   if (LLVM_BUILD_DOCS)
84    add_dependencies(doxygen doxygen-flang)
85   endif()
87   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_DOCS)
88     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
89       DESTINATION docs/html)
90   endif()
91 endif()
92 endif()
94 if (LLVM_ENABLE_SPHINX)
95   include(AddSphinxTarget)
96   if (SPHINX_FOUND)
97     if (${SPHINX_OUTPUT_HTML})
98       add_sphinx_target(html flang)
99     endif()
100     if (${SPHINX_OUTPUT_MAN})
101       add_sphinx_target(man flang)
102     endif()
103   endif()
104 endif()