llvm.org GIT mirror llvm / fac2487
[docs] Teach CMake docs build how to generate Qt Creator help/documentation files. Patch by Konrad Kleine. Differential Revision: http://llvm-reviews.chandlerc.com/D2967 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203272 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Gottesman 5 years ago
3 changed file(s) with 123 addition(s) and 39 deletion(s). Raw diff Collapse all Expand all
281281 Define the sanitizer used to build LLVM binaries and tests. Possible values
282282 are ``Address``, ``Memory`` and ``MemoryWithOrigins``. Defaults to empty
283283 string.
284
285 **LLVM_ENABLE_DOXYGEN**:BOOL
286 Enables the generation of browsable HTML documentation using doxygen.
287 Defaults to OFF.
288
289 **LLVM_ENABLE_DOXYGEN_QT_HELP**:BOOL
290 Enables the generation of a Qt Compressed Help file. Defaults to OFF.
291 This affects the make target ``doxygen-llvm``. When enabled, apart from
292 the normal HTML output generated by doxygen, this will produce a QCH file
293 named ``org.llvm.qch``. You can then load this file into Qt Creator.
294 This option is only useful in combination with ``-DLLVM_ENABLE_DOXYGEN=ON``;
295 otherwise this has no effect.
296
297 **LLVM_DOXYGEN_QCH_FILENAME**:STRING
298 The filename of the Qt Compressed Help file that will be genrated when
299 ``-DLLVM_ENABLE_DOXYGEN=ON`` and
300 ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON`` are given. Defaults to
301 ``org.llvm.qch``.
302 This option is only useful in combination with
303 ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``;
304 otherwise this has no effect.
305
306 **LLVM_DOXYGEN_QHP_NAMESPACE**:STRING
307 Namespace under which the intermediate Qt Help Project file lives. See `Qt
308 Help Project `_
309 for more information. Defaults to "org.llvm". This option is only useful in
310 combination with ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise
311 this has no effect.
312
313 **LLVM_DOXYGEN_QHP_CUST_FILTER_NAME**:STRING
314 See `Qt Help Project
315 `_ for
316 more information. Defaults to the CMake variable ``${PACKAGE_STRING}`` which
317 is a combination of the package name and version string. This filter can then
318 be used in Qt Creator to select only documentation from LLVM when browsing
319 through all the help files that you might have loaded. This option is only
320 useful in combination with ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``;
321 otherwise this has no effect.
322
323 **LLVM_DOXYGEN_QHELPGENERATOR_PATH**:STRING
324 The path to the ``qhelpgenerator`` executable. Defaults to whatever CMake's
325 ``find_program()`` can find. This option is only useful in combination with
326 ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise this has no
327 effect.
284328
285329 Executing the test suite
286330 ========================
2121 set(extra_search_mappings "")
2222 endif()
2323
24 # If asked, configure doxygen for the creation of a Qt Compressed Help file.
25 option(LLVM_ENABLE_DOXYGEN_QT_HELP
26 "Generate a Qt Compressed Help file." OFF)
27 if (LLVM_ENABLE_DOXYGEN_QT_HELP)
28 set(LLVM_DOXYGEN_QCH_FILENAME "org.llvm.qch" CACHE STRING
29 "Filename of the Qt Compressed help file")
30 set(LLVM_DOXYGEN_QHP_NAMESPACE "org.llvm" CACHE STRING
31 "Namespace under which the intermediate Qt Help Project file lives")
32 set(LLVM_DOXYGEN_QHP_CUST_FILTER_NAME "${PACKAGE_STRING}" CACHE STRING
33 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
34 set(LLVM_DOXYGEN_QHP_CUST_FILTER_ATTRS "${PACKAGE_NAME},${PACKAGE_VERSION}" CACHE STRING
35 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
36 find_program(LLVM_DOXYGEN_QHELPGENERATOR_PATH qhelpgenerator
37 DOC "Path to the qhelpgenerator binary")
38 if (NOT LLVM_DOXYGEN_QHELPGENERATOR_PATH)
39 message(FATAL_ERROR "Failed to find qhelpgenerator binary")
40 endif()
41
42 set(llvm_doxygen_generate_qhp "YES")
43 set(llvm_doxygen_qch_filename "${LLVM_DOXYGEN_QCH_FILENAME}")
44 set(llvm_doxygen_qhp_namespace "${LLVM_DOXYGEN_QHP_NAMESPACE}")
45 set(llvm_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
46 set(llvm_doxygen_qhp_cust_filter_name "${LLVM_DOXYGEN_QHP_CUST_FILTER_NAME}")
47 set(llvm_doxygen_qhp_cust_filter_attrs "${LLVM_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
48
49 else()
50 set(llvm_doxygen_generate_qhp "NO")
51 set(llvm_doxygen_qch_filename "")
52 set(llvm_doxygen_qhp_namespace "")
53 set(llvm_doxygen_qhelpgenerator_path "")
54 set(llvm_doxygen_qhp_cust_filter_name "")
55 set(llvm_doxygen_qhp_cust_filter_attrs "")
56 endif()
57
2458 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
2559 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
2660
3266 set(enable_server_based_search)
3367 set(enable_external_search)
3468 set(extra_search_mappings)
69 set(llvm_doxygen_generate_qhp)
70 set(llvm_doxygen_qch_filename)
71 set(llvm_doxygen_qhp_namespace)
72 set(llvm_doxygen_qhelpgenerator_path)
73 set(llvm_doxygen_qhp_cust_filter_name)
74 set(llvm_doxygen_qhp_cust_filter_attrs)
3575
3676 add_custom_target(doxygen-llvm
3777 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
937937
938938 TOC_EXPAND = NO
939939
940 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
941 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
942 # that can be used as input for Qt's qhelpgenerator to generate a
940 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
941 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
942 # that can be used as input for Qt's qhelpgenerator to generate a
943943 # Qt Compressed Help (.qch) of the generated HTML documentation.
944944
945 GENERATE_QHP = NO
946
947 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
948 # be used to specify the file name of the resulting .qch file.
945 GENERATE_QHP = @llvm_doxygen_generate_qhp@
946
947 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
948 # be used to specify the file name of the resulting .qch file.
949949 # The path specified is relative to the HTML output folder.
950950
951 QCH_FILE =
952
953 # The QHP_NAMESPACE tag specifies the namespace to use when generating
954 # Qt Help Project output. For more information please see
955 # http://doc.trolltech.com/qthelpproject.html#namespace
956
957 QHP_NAMESPACE = org.doxygen.Project
958
959 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
960 # Qt Help Project output. For more information please see
961 # http://doc.trolltech.com/qthelpproject.html#virtual-folders
951 QCH_FILE = @llvm_doxygen_qch_filename@
952
953 # The QHP_NAMESPACE tag specifies the namespace to use when generating
954 # Qt Help Project output. For more information please see
955 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace
956
957 QHP_NAMESPACE = @llvm_doxygen_qhp_namespace@
958
959 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
960 # Qt Help Project output. For more information please see
961 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-folders
962962
963963 QHP_VIRTUAL_FOLDER = doc
964964
965 # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
966 # add. For more information please see
967 # http://doc.trolltech.com/qthelpproject.html#custom-filters
968
969 QHP_CUST_FILTER_NAME =
970
971 # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
972 # custom filter to add. For more information please see
973 #
965 # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
966 # add. For more information please see
967 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters
968
969 QHP_CUST_FILTER_NAME = @llvm_doxygen_qhp_cust_filter_name@
970
971 # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
972 # custom filter to add. For more information please see
973 #
974974 # Qt Help Project / Custom Filters.
975975
976 QHP_CUST_FILTER_ATTRS =
977
978 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
979 # project's
980 # filter section matches.
981 #
976 QHP_CUST_FILTER_ATTRS = @llvm_doxygen_qhp_cust_filter_attrs@
977
978 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
979 # project's
980 # filter section matches.
981 #
982982 # Qt Help Project / Filter Attributes.
983983
984 QHP_SECT_FILTER_ATTRS =
985
986 # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
987 # be used to specify the location of Qt's qhelpgenerator.
988 # If non-empty doxygen will try to run qhelpgenerator on the generated
984 QHP_SECT_FILTER_ATTRS =
985
986 # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
987 # be used to specify the location of Qt's qhelpgenerator.
988 # If non-empty doxygen will try to run qhelpgenerator on the generated
989989 # .qhp file.
990990
991 QHG_LOCATION =
991 QHG_LOCATION = @llvm_doxygen_qhelpgenerator_path@
992992
993993 # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
994994 # will be generated, which together with the HTML files, form an Eclipse help