[mlpack-svn] r11258 - mlpack/trunk

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Jan 23 13:01:19 EST 2012


Author: rcurtin
Date: 2012-01-23 13:01:19 -0500 (Mon, 23 Jan 2012)
New Revision: 11258

Modified:
   mlpack/trunk/CMakeLists.txt
Log:
Add 'make doc' command, but it does not yet install the documentation (that will
come next).


Modified: mlpack/trunk/CMakeLists.txt
===================================================================
--- mlpack/trunk/CMakeLists.txt	2012-01-23 17:45:17 UTC (rev 11257)
+++ mlpack/trunk/CMakeLists.txt	2012-01-23 18:01:19 UTC (rev 11258)
@@ -109,3 +109,22 @@
 
 ## recurse
 add_subdirectory(src/mlpack) # mlpack
+
+# Make a target to generate the documentation.  If Doxygen isn't installed, then
+# I guess this option will just be unavailable.
+find_package(Doxygen)
+if (DOXYGEN_FOUND)
+  # It may be better if we built the documentation into the build directory, but
+  # I'm leaving this for a later day.
+  add_custom_target(doc
+    ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    COMMENT "Generating API documentation with Doxygen"
+  )
+  add_custom_command(TARGET doc
+    POST_BUILD
+    COMMAND cmake -E copy_directory
+        ${CMAKE_CURRENT_SOURCE_DIR}/doc ${CMAKE_BINARY_DIR}/doc
+    COMMENT "Copying API documentation to build directory"
+  )
+endif (DOXYGEN_FOUND)




More information about the mlpack-svn mailing list