Procházet zdrojové kódy

ENH: Remove BUILD_DOCUMENTATION and create 2 targets for doxygen documentation generation: doc (for users) and doc-dev (dor developers)

Arnaud GELAS před 15 roky
rodič
revize
7d6b374733
3 změnil soubory, kde provedl 23 přidání a 14 odebrání
  1. 4 9
      CMakeLists.txt
  2. 18 4
      Documentation/CMakeLists.txt
  3. 1 1
      Documentation/Doxyfile.txt.in

+ 4 - 9
CMakeLists.txt

@@ -246,16 +246,11 @@ 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 )
+ADD_SUBDIRECTORY( Documentation )
 
-
-#-----------------------------------------------------------------------------
+#---------------------------------------------------------------------------
 # Will contain a list of sub-directory without option ON or OFF
 #
 SET(CTK_LIBS_SUBDIRS )
@@ -458,4 +453,4 @@ INCLUDE(Utilities/KWStyle/KWStyle.cmake)
 # The commands in this directory are intended to be executed as
 # the end of the whole configuration process, as a "last step".
 # This directory is typically the last SUBDIRS in the main CMakeLists.txt.
-ADD_SUBDIRECTORY(Utilities/LastConfigureStep)
+ADD_SUBDIRECTORY(Utilities/LastConfigureStep)

+ 18 - 4
Documentation/CMakeLists.txt

@@ -2,17 +2,31 @@ FIND_PACKAGE( Doxygen )
 
 IF( DOXYGEN_FOUND )
   IF( DOXYGEN_DOT_FOUND )
+  
+    SET( CTK_USER_DOCUMENTATION "NO" )
+
+    CONFIGURE_FILE( Doxyfile.txt.in
+      ${CTK_BINARY_DIR}/Documentation/UserDoxyfile.txt
+    )
+
+    ADD_CUSTOM_TARGET( doc 
+      ${DOXYGEN_EXECUTABLE} ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt 
+      DEPENDS ${CTK_BINARY_DIR}/Documentation/UserDoxyfile.txt
+    ) 
+
+    SET( CTK_USER_DOCUMENTATION "YES" )
+
     CONFIGURE_FILE( Doxyfile.txt.in
-      ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt
+      ${CTK_BINARY_DIR}/Documentation/DevDoxyfile.txt
     )
 
-    ADD_CUSTOM_TARGET( doc ALL 
+    ADD_CUSTOM_TARGET( doc-dev 
       ${DOXYGEN_EXECUTABLE} ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt 
-      DEPENDS ${CTK_BINARY_DIR}/Documentation/Doxyfile.txt
+      DEPENDS ${CTK_BINARY_DIR}/Documentation/DevDoxyfile.txt
     ) 
   ELSE( DOXYGEN_DOT_FOUND )
     MESSAGE( SEND_ERROR
       "Warning: Doxygen not found - Documentation will not be created"
       )
   ENDIF( DOXYGEN_DOT_FOUND )
-ENDIF( DOXYGEN_FOUND )
+ENDIF( DOXYGEN_FOUND )

+ 1 - 1
Documentation/Doxyfile.txt.in

@@ -312,7 +312,7 @@ EXTRACT_ALL            = YES
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
-EXTRACT_PRIVATE        = YES
+EXTRACT_PRIVATE        = @CTK_USER_DOCUMENTATION@
 
 # If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.