Use CMake to invoke Doxygen

This commit is contained in:
Lane Schwartz 2016-09-16 18:28:00 +02:00
parent 6534403830
commit 5e9cad3169
3 changed files with 15 additions and 1 deletions

View File

@ -20,3 +20,14 @@ endif(Boost_FOUND)
include_directories(${marian_SOURCE_DIR}/src) include_directories(${marian_SOURCE_DIR}/src)
add_subdirectory(src) add_subdirectory(src)
# 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 ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)

View File

@ -743,7 +743,7 @@ WARN_LOGFILE =
# spaces. # spaces.
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = src INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@ -29,3 +29,6 @@ Compilation with `cmake > 3.5`:
cmake .. cmake ..
make -j make -j
To compile API documentation using Doxygen, first cd to the build directory, and then:
make doc