r189508 - [doxygen] Added code for generating doxygen documentation for clang for cmake.
Michael Gottesman
mgottesman at apple.com
Wed Aug 28 13:29:40 PDT 2013
Author: mgottesman
Date: Wed Aug 28 15:29:40 2013
New Revision: 189508
URL: http://llvm.org/viewvc/llvm-project?rev=189508&view=rev
Log:
[doxygen] Added code for generating doxygen documentation for clang for cmake.
Added:
cfe/trunk/docs/CMakeLists.txt
Modified:
cfe/trunk/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=189508&r1=189507&r2=189508&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed Aug 28 15:29:40 2013
@@ -335,13 +335,17 @@ option(CLANG_INCLUDE_TESTS
"Generate build targets for the Clang unit tests."
${LLVM_INCLUDE_TESTS})
-# TODO: docs.
-
if( CLANG_INCLUDE_TESTS )
add_subdirectory(test)
add_subdirectory(unittests)
endif()
+option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
+ ${LLVM_INCLUDE_DOCS})
+if( CLANG_INCLUDE_DOCS )
+ add_subdirectory(docs)
+endif()
+
# Workaround for MSVS10 to avoid the Dialog Hell
# FIXME: This could be removed with future version of CMake.
if( CLANG_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 )
Added: cfe/trunk/docs/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/CMakeLists.txt?rev=189508&view=auto
==============================================================================
--- cfe/trunk/docs/CMakeLists.txt (added)
+++ cfe/trunk/docs/CMakeLists.txt Wed Aug 28 15:29:40 2013
@@ -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()
More information about the cfe-commits
mailing list