2013-05-28 11:47:34 +08:00
|
|
|
|
|
|
|
include(FindDoxygen)
|
|
|
|
|
|
|
|
if(DOXYGEN_FOUND)
|
|
|
|
set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
|
|
|
set(DOT dot)
|
|
|
|
set(PACKAGE_VERSION mainline)
|
|
|
|
set(abs_top_builddir ..)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(lldb-cpp-doc
|
|
|
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMENT "Generating LLDB C++ API reference with Doxygen" VERBATIM
|
|
|
|
)
|
|
|
|
endif(DOXYGEN_FOUND)
|
|
|
|
|
|
|
|
find_package(PythonInterp REQUIRED)
|
|
|
|
find_program(EPYDOC_EXECUTABLE NAMES epydoc epydoc.py)
|
|
|
|
if(EPYDOC_EXECUTABLE)
|
|
|
|
find_program(DOT_EXECUTABLE dot)
|
|
|
|
if(DOT_EXECUTABLE)
|
|
|
|
set(EPYDOC_OPTIONS ${EPYDOC_OPTIONS} --graph all --dotpath ${DOT_EXECUTABLE})
|
|
|
|
endif()
|
|
|
|
set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
|
|
|
|
file(MAKE_DIRECTORY "${DOC_DIR}")
|
|
|
|
#set(ENV{PYTHONPATH} ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/python2.7/site-packages)
|
|
|
|
add_custom_target(lldb-python-doc
|
|
|
|
${EPYDOC_EXECUTABLE}
|
|
|
|
--html
|
|
|
|
lldb
|
|
|
|
-o ${CMAKE_CURRENT_BINARY_DIR}/python_reference
|
|
|
|
--name "LLDB python API"
|
|
|
|
--url "http://lldb.llvm.org"
|
|
|
|
${EPYDOC_OPTIONS}
|
|
|
|
DEPENDS swig_wrapper liblldb
|
[cmake/multilib] Teach LLDB to respect the multlib LLVM_LIBDIR_SUFFIX
variable (now provided both by the normal parent LLVM CMake files and by
the LLVMConfig.cmake file used by the standalone build).
This allows LLDB to build into and install into correctly suffixed
libdirs. This is especially significant for LLDB because the python
extension building done by CMake directly uses multilib suffixes when
the host OS does, and the host OS will not always look back and forth
between them. As a consequence, before LLVM, Clang, and LLDB (and every
other subproject) had support for using LLVM_LIBDIR_SUFFIX, you couldn't
build or install LLDB on a multilib system with its python extensions
enabled. With this patch (on top of all the others I have submitted
throughout the project), I'm finally able to build and install LLDB on
my system with Python support enabled. I'm also able to actually run the
LLDB test suite, etc. Now, a *huge* number of the tests still fail on my
Linux system, but hey, actually running them and them testing the
debugger is a huge step forward. =D
llvm-svn: 224930
2014-12-29 20:42:33 +08:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../../lib${LLVM_LIBDIR_SUFFIX}/python2.7/site-packages
|
2013-07-20 01:32:48 +08:00
|
|
|
COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
|
2013-05-28 11:47:34 +08:00
|
|
|
)
|
|
|
|
endif(EPYDOC_EXECUTABLE)
|