diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-08-28 20:29:40 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-08-28 20:29:40 +0000 |
commit | 8f897af39c3dca2451e8e477e3443baee9801aff (patch) | |
tree | 157c454c169d898e2349d3296838c65410b3c03a /clang/docs/CMakeLists.txt | |
parent | 7ed90880bc386f54f448a6b6e4c5f0fa5da0e1cb (diff) | |
download | llvm-8f897af39c3dca2451e8e477e3443baee9801aff.zip llvm-8f897af39c3dca2451e8e477e3443baee9801aff.tar.gz llvm-8f897af39c3dca2451e8e477e3443baee9801aff.tar.bz2 |
[doxygen] Added code for generating doxygen documentation for clang for cmake.
llvm-svn: 189508
Diffstat (limited to 'clang/docs/CMakeLists.txt')
-rw-r--r-- | clang/docs/CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/docs/CMakeLists.txt b/clang/docs/CMakeLists.txt new file mode 100644 index 0000000..dee97cc --- /dev/null +++ b/clang/docs/CMakeLists.txt @@ -0,0 +1,31 @@ + +if (DOXYGEN_FOUND) +if (LLVM_ENABLE_DOXYGEN) + set(abs_srcdir ${LLVM_MAIN_SRC_DIR}) + set(abs_builddir ${LLVM_BINARY_DIR}) + + if (HAVE_DOT) + set(DOT ${LLVM_PATH_DOT}) + endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) + set(abs_srcdir) + set(abs_builddir) + set(DOT) + + 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() |