• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2include(FindDoxygen)
3
4if(DOXYGEN_FOUND)
5  set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR}/..)
6  set(DOT dot)
7  set(PACKAGE_VERSION mainline)
8  set(abs_top_builddir ..)
9  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
10  ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
11
12  add_custom_target(lldb-cpp-doc
13    ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
14    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
15    COMMENT "Generating LLDB C++ API reference with Doxygen" VERBATIM
16  )
17endif(DOXYGEN_FOUND)
18
19find_package(PythonInterp REQUIRED)
20find_program(EPYDOC_EXECUTABLE NAMES epydoc epydoc.py)
21if(EPYDOC_EXECUTABLE)
22  find_program(DOT_EXECUTABLE dot)
23    if(DOT_EXECUTABLE)
24      set(EPYDOC_OPTIONS ${EPYDOC_OPTIONS} --graph all --dotpath ${DOT_EXECUTABLE})
25    endif()
26    set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
27    file(MAKE_DIRECTORY "${DOC_DIR}")
28    #set(ENV{PYTHONPATH} ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/python2.7/site-packages)
29    add_custom_target(lldb-python-doc
30      ${EPYDOC_EXECUTABLE}
31      --html
32      lldb
33      -o ${CMAKE_CURRENT_BINARY_DIR}/python_reference
34      --name "LLDB python API"
35      --url "http://lldb.llvm.org"
36      ${EPYDOC_OPTIONS}
37      DEPENDS swig_wrapper liblldb
38      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/python2.7/site-packages
39      COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
40    )
41endif(EPYDOC_EXECUTABLE)
42