doc: make docs not generate by default. BUILDDOC
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Wed, 11 Jun 2014 08:13:15 +0000 (09:13 +0100)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Wed, 11 Jun 2014 13:36:56 +0000 (14:36 +0100)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
CMakeLists.txt

index 07fdaa9..08316df 100644 (file)
@@ -44,17 +44,20 @@ set (upm_VERSION_STRING ${maa_VERSION_MAJOR}.${maa_VERSION_MINOR}.${maa_VERSION_
 set (CMAKE_SWIG_FLAGS "")
 
 option (IPK "Generate IPK using CPack" OFF)
+option (BUILDDOC "Build all doc." OFF)
 
-# add a target to generate API documentation with Doxygen
-find_package (Doxygen)
-if (DOXYGEN_FOUND)
-  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-  add_custom_target (doc
-    ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMENT "Generating API documentation with Doxygen" VERBATIM
-  )
-endif (DOXYGEN_FOUND)
+if (BUILDDOC)
+  # add a target to generate API documentation with Doxygen
+  find_package (Doxygen)
+  if (DOXYGEN_FOUND)
+    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+    add_custom_target (doc
+      ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      COMMENT "Generating API documentation with Doxygen" VERBATIM
+    )
+  endif (DOXYGEN_FOUND)
+endif()
 
 if (IPK)
   include (TargetArch)