浏览代码

ENH: Enable doxygen documentation generation (Note: it is turned OFF by default)

Arnaud GELAS 15 年之前
父节点
当前提交
715a291db1
共有 3 个文件被更改,包括 1597 次插入1 次删除
  1. 9 1
      CMakeLists.txt
  2. 18 0
      Documentation/CMakeLists.txt
  3. 1570 0
      Documentation/Doxyfile.txt.in

+ 9 - 1
CMakeLists.txt

@@ -220,6 +220,14 @@ MARK_AS_ADVANCED(DART_TESTING_TIMEOUT)
 OPTION(CTK_USE_KWSTYLE     "Enable sourcecode-based style tests." OFF)
 #MARK_AS_ADVANCED(CTK_USE_KWSTYLE)
 
+#-----------------------------------------------------------------------------
+# Documentation
+OPTION( BUILD_DOCUMENTATION "Build Documentation" OFF )
+
+IF( BUILD_DOCUMENTATION )
+  ADD_SUBDIRECTORY( Documentation )
+ENDIF( BUILD_DOCUMENTATION )
+
 # Build options associated with CTK libraries
 # Note also that if
 # the file Libs/<DIR>/<LIBNAME>/ctk_library_options.cmake exists and look like:
@@ -393,7 +401,7 @@ ENDFOREACH()
 #
 #ADD_SUBDIRECTORY(Testing)
 #ADD_SUBDIRECTORY(Examples)
-    
+
 #-----------------------------------------------------------------------------
 # Style Checking configuration
 #

+ 18 - 0
Documentation/CMakeLists.txt

@@ -0,0 +1,18 @@
+FIND_PACKAGE( Doxygen )
+
+IF( DOXYGEN_FOUND )
+  IF( DOXYGEN_DOT_FOUND )
+    CONFIGURE_FILE( Doxyfile.txt.in
+      ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt
+    )
+
+    ADD_CUSTOM_TARGET( doc ALL 
+      ${DOXYGEN_EXECUTABLE} ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt 
+      DEPENDS ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt
+    ) 
+  ELSE( DOXYGEN_DOT_FOUND )
+    MESSAGE( SEND_ERROR
+      "Warning: Doxygen not found - Documentation will not be created"
+      )
+  ENDIF( DOXYGEN_DOT_FOUND )
+ENDIF( DOXYGEN_FOUND )

文件差异内容过多而无法显示
+ 1570 - 0
Documentation/Doxyfile.txt.in