Doxygen for C++ client API

If doxygen is available, build 'doxygen' taget to generate
Doxygen docs from client.h and other Kudu C++ client API files,
After the target is built, open
${CMAKE_CURRENT_BINARY_DIR}/docs/doxygen/client_api/html/index.html
in your favorite browser to see the generated documentation.

If doxygen is available, the 'docs' target generates
doxygen documentaion as well since it depends on the 'doxygen' target.

Change-Id: Ie7d42fb1c90b83074e357dcecf42489ed9fc4f02
Reviewed-on: http://gerrit.cloudera.org:8080/3619
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <d...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/3cb390e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/3cb390e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/3cb390e3

Branch: refs/heads/master
Commit: 3cb390e380e120c4895ed3a57cad2a05506e83fe
Parents: 3dd0ad2
Author: Alexey Serbin <aser...@cloudera.com>
Authored: Mon Jul 11 16:44:16 2016 -0700
Committer: Dan Burkert <d...@cloudera.com>
Committed: Fri Jul 22 18:25:45 2016 +0000

----------------------------------------------------------------------
 CMakeLists.txt                          |   32 +
 docs/support/doxygen/client_api.doxy.in |   70 +
 src/kudu/client/client.h                | 1920 ++++++++++++++++----------
 src/kudu/util/CMakeLists.txt            |    3 +-
 thirdparty/download-thirdparty.sh       |    4 +-
 5 files changed, 1303 insertions(+), 726 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3cb390e3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 654132c..e924c2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -972,6 +972,38 @@ if (UNIX)
 endif (UNIX)
 
 ############################################################
+# "make doxygen" target
+# Needs the doxygen system package to work.
+############################################################
+if (UNIX)
+  find_package(Doxygen)
+  if (NOT DOXYGEN_FOUND)
+    message(WARNING "Doxygen not found: 'doxygen' target is not available")
+  else ()
+    set(DOXY_SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/docs/doxygen)
+    set(DOXY_CLIENT_DESTDIR ${DOXY_SUBDIR}/tmp.client)
+    set(DOXY_CLIENT_API_CFG ${DOXY_SUBDIR}/client_api.doxy)
+    set(DOXY_CLIENT_API_OUTDIR ${DOXY_SUBDIR}/client_api)
+    # NOTE: DOXY_CLIENT_API_OUTDIR is used in client_api.doxy.in template file
+    configure_file(docs/support/doxygen/client_api.doxy.in 
${DOXY_CLIENT_API_CFG} @ONLY)
+    add_custom_target(doxy_install_client_alt_destdir
+      COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOXY_CLIENT_DESTDIR}
+      COMMAND ${CMAKE_MAKE_PROGRAM} install DESTDIR=${DOXY_CLIENT_DESTDIR}
+      COMMENT "Installing Kudu client files into temporary destroot"
+    )
+    add_custom_target(doxygen
+      COMMAND ${DOXYGEN_EXECUTABLE} ${DOXY_CLIENT_API_CFG}
+      WORKING_DIRECTORY ${DOXY_CLIENT_DESTDIR}/${CMAKE_INSTALL_PREFIX}
+      COMMENT "Generating Kudu C++ client API documentation"
+    )
+    add_dependencies(doxy_install_client_alt_destdir kudu_client_exported)
+    add_dependencies(doxygen doxy_install_client_alt_destdir)
+    # If doxygen is present, generate doxygen documentation along with 'docs'.
+    add_dependencies(docs doxygen)
+  endif ()
+endif (UNIX)
+
+############################################################
 # Subdirectories
 ############################################################
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3cb390e3/docs/support/doxygen/client_api.doxy.in
----------------------------------------------------------------------
diff --git a/docs/support/doxygen/client_api.doxy.in 
b/docs/support/doxygen/client_api.doxy.in
new file mode 100644
index 0000000..b51a308
--- /dev/null
+++ b/docs/support/doxygen/client_api.doxy.in
@@ -0,0 +1,70 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# This file describes the settings to be used by doxygen (www.doxygen.org)
+# to generate Kudu C++ client API documentation.  Current contents of the file
+# is based on template generated by doxygen v1.8.10.  After the template file
+# was generated, all parameters with default values were removed
+# along with corresponding comments.  Only relevant parameters
+# with custom settings are left.
+#
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated.  This name is used in the
+# title of most generated pages and in a few other places.  Here we generate
+# documentation for Kudu C++ client API.
+PROJECT_NAME           = "Kudu C++ client API"
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files.  You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject.  Separate the files or directories with
+# spaces.  Current empty value reflects the fact that working directory where
+# doxygen runs is the location where necessary directory structure
+# with header files resides.
+INPUT                  =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.  Due to current layout of the header
+# file to process, the recursive scan for files is turned on.
+RECURSIVE              = YES
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written.  If a relative path 
is
+# entered, it will be relative to the location where doxygen was started.  If
+# left blank the current directory will be used.  Current value is set by
+# one of make targets while generating the Kudu C++ client API documentation.
+OUTPUT_DIRECTORY       = @DOXY_CLIENT_API_OUTDIR@
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. Do not be too verbose: QUIET is set to YES,
+# so informational messages are off.
+QUIET                  = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions 
that
+# are documented, but have no documentation for their parameters or return
+# value.  If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# We want to have those warnings on for now.
+WARN_NO_PARAMDOC       = YES
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# As for now, documentation in LaTeX format is not needed.
+GENERATE_LATEX         = NO

Reply via email to