2013-08-29 04:29:40 +08:00
|
|
|
|
|
|
|
if (DOXYGEN_FOUND)
|
|
|
|
if (LLVM_ENABLE_DOXYGEN)
|
2013-08-29 04:29:44 +08:00
|
|
|
set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
|
2013-08-29 05:55:41 +08:00
|
|
|
set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
|
2013-08-29 04:29:40 +08:00
|
|
|
|
|
|
|
if (HAVE_DOT)
|
|
|
|
set(DOT ${LLVM_PATH_DOT})
|
|
|
|
endif()
|
|
|
|
|
2013-08-29 05:55:41 +08:00
|
|
|
if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
|
|
|
|
set(enable_searchengine "YES")
|
|
|
|
set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
|
|
|
|
set(enable_server_based_search "YES")
|
|
|
|
set(enable_external_search "YES")
|
|
|
|
set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
|
2013-08-29 04:29:44 +08:00
|
|
|
else()
|
2013-08-29 05:55:41 +08:00
|
|
|
set(enable_searchengine "NO")
|
|
|
|
set(searchengine_url "")
|
|
|
|
set(enable_server_based_search "NO")
|
|
|
|
set(enable_external_search "NO")
|
|
|
|
set(extra_search_mappings "")
|
2013-08-29 04:29:44 +08:00
|
|
|
endif()
|
|
|
|
|
2014-03-13 22:17:01 +08:00
|
|
|
# If asked, configure doxygen for the creation of a Qt Compressed Help file.
|
|
|
|
if (LLVM_ENABLE_DOXYGEN_QT_HELP)
|
|
|
|
set(CLANG_DOXYGEN_QCH_FILENAME "org.llvm.clang.qch" CACHE STRING
|
|
|
|
"Filename of the Qt Compressed help file")
|
|
|
|
set(CLANG_DOXYGEN_QHP_NAMESPACE "org.llvm.clang" CACHE STRING
|
|
|
|
"Namespace under which the intermediate Qt Help Project file lives")
|
|
|
|
set(CLANG_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${CLANG_VERSION}" CACHE STRING
|
|
|
|
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
|
|
|
|
set(CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${CLANG_VERSION}" CACHE STRING
|
|
|
|
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
|
|
|
|
set(clang_doxygen_generate_qhp "YES")
|
|
|
|
set(clang_doxygen_qch_filename "${CLANG_DOXYGEN_QCH_FILENAME}")
|
|
|
|
set(clang_doxygen_qhp_namespace "${CLANG_DOXYGEN_QHP_NAMESPACE}")
|
|
|
|
set(clang_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
|
|
|
|
set(clang_doxygen_qhp_cust_filter_name "${CLANG_DOXYGEN_QHP_CUST_FILTER_NAME}")
|
|
|
|
set(clang_doxygen_qhp_cust_filter_attrs "${CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
|
|
|
|
else()
|
|
|
|
set(clang_doxygen_generate_qhp "NO")
|
|
|
|
set(clang_doxygen_qch_filename "")
|
|
|
|
set(clang_doxygen_qhp_namespace "")
|
|
|
|
set(clang_doxygen_qhelpgenerator_path "")
|
|
|
|
set(clang_doxygen_qhp_cust_filter_name "")
|
|
|
|
set(clang_doxygen_qhp_cust_filter_attrs "")
|
|
|
|
endif()
|
|
|
|
|
2015-08-18 07:38:56 +08:00
|
|
|
option(LLVM_DOXYGEN_SVG
|
|
|
|
"Use svg instead of png files for doxygen graphs." OFF)
|
|
|
|
if (LLVM_DOXYGEN_SVG)
|
|
|
|
set(DOT_IMAGE_FORMAT "svg")
|
|
|
|
else()
|
|
|
|
set(DOT_IMAGE_FORMAT "png")
|
|
|
|
endif()
|
|
|
|
|
2013-08-29 04:29:40 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
|
2013-08-29 05:55:41 +08:00
|
|
|
|
|
|
|
set(abs_top_srcdir)
|
|
|
|
set(abs_top_builddir)
|
2013-08-29 04:29:40 +08:00
|
|
|
set(DOT)
|
2013-08-29 05:55:41 +08:00
|
|
|
set(enable_searchengine)
|
|
|
|
set(searchengine_url)
|
|
|
|
set(enable_server_based_search)
|
|
|
|
set(enable_external_search)
|
|
|
|
set(extra_search_mappings)
|
2014-03-13 22:17:01 +08:00
|
|
|
set(clang_doxygen_generate_qhp)
|
|
|
|
set(clang_doxygen_qch_filename)
|
|
|
|
set(clang_doxygen_qhp_namespace)
|
|
|
|
set(clang_doxygen_qhelpgenerator_path)
|
|
|
|
set(clang_doxygen_qhp_cust_filter_name)
|
|
|
|
set(clang_doxygen_qhp_cust_filter_attrs)
|
2015-08-18 07:38:56 +08:00
|
|
|
set(DOT_IMAGE_FORMAT)
|
2013-08-29 04:29:40 +08:00
|
|
|
|
|
|
|
add_custom_target(doxygen-clang
|
|
|
|
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMENT "Generating clang doxygen documentation." VERBATIM)
|
|
|
|
|
|
|
|
if (LLVM_BUILD_DOCS)
|
|
|
|
add_dependencies(doxygen doxygen-clang)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
|
|
|
|
DESTINATION docs/html)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-04-19 05:55:46 +08:00
|
|
|
|
|
|
|
if (LLVM_ENABLE_SPHINX)
|
|
|
|
if (SPHINX_FOUND)
|
|
|
|
include(AddSphinxTarget)
|
|
|
|
if (${SPHINX_OUTPUT_HTML})
|
|
|
|
add_sphinx_target(html clang)
|
2016-02-09 18:59:21 +08:00
|
|
|
configure_file(LibASTMatchersReference.html
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/html/LibASTMatchersReference.html" COPYONLY)
|
2014-04-19 05:55:46 +08:00
|
|
|
endif()
|
Sphinx-based clang man pages
Summary:
This diff introduces .rst files, Sphinx config, and a CMake target
for building clang man pages. This will deprecate the existing .pod-
based man page, and will integrate nicely with CMake. This diff does
not remove the existing man page; that will be done in a follow-up
once packagers have had a chance to react to the change.
For now, only clang(1) has been done; others can be added over time
by dropping additional files into the docs/CommandGuide directory.
The index page for CommandGuide has been copied from LLVM's
docs/CommandGuide.
The man page itself is mostly the same, with a few minor cosmetic
changes. The only major change is the SYNOPSIS section. I was unable
to get .rst/Sphinx produce the same style as in the existing man page.
Instead, I changed it to match the LLVM tools' relatively simple style.
To build the man pages, use the "docs-clang-man" target if building
with CMake. Otherwise, use "make -f Makefile.sphinx man".
Reviewers: cmatthews, silvas
Subscribers: dim, gaeke, beanz, cfe-commits
Differential Revision: http://reviews.llvm.org/D10562
llvm-svn: 241037
2015-06-30 10:52:38 +08:00
|
|
|
if (${SPHINX_OUTPUT_MAN})
|
|
|
|
add_sphinx_target(man clang)
|
|
|
|
endif()
|
2014-04-19 05:55:46 +08:00
|
|
|
endif()
|
|
|
|
endif()
|