Skip to content

Commit

Permalink
Merge pull request #210 from gheber/master
Browse files Browse the repository at this point in the history
Doxygen conversation starter
  • Loading branch information
gheber committed Jul 6, 2021
2 parents 6a0189a + 05366ff commit 8529528
Show file tree
Hide file tree
Showing 6 changed files with 420 additions and 7 deletions.
33 changes: 33 additions & 0 deletions CMake/UseDoxygenDoc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
find_package(Perl REQUIRED)
find_package(Doxygen REQUIRED)

function(add_doxygen_doc)
set(options)
set(oneValueArgs BUILD_DIR DOXY_FILE TARGET_NAME COMMENT)
set(multiValueArgs)

cmake_parse_arguments(DOXY_DOC
"${options}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN}
)

configure_file(
${DOXY_DOC_DOXY_FILE}
${DOXY_DOC_BUILD_DIR}/Doxyfile
@ONLY
)

add_custom_target(${DOXY_DOC_TARGET_NAME}
COMMAND
${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY
${DOXY_DOC_BUILD_DIR}
COMMENT
"Building ${DOXY_DOC_COMMENT} with Doxygen"
VERBATIM
)

message(STATUS "Added ${DOXY_DOC_TARGET_NAME} [Doxygen] target to build documentation")
endfunction()
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ endif()
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
option(HERMES_INTERCEPT_IO "Use GOTCHA as IO interception tool" ON)
option(HERMES_COMMUNICATION_MPI "Use MPI as the communication layer." ON)
option(HERMES_ENABLE_DOXYGEN "Enable hermes documentation." OFF)
option(HERMES_BUILD_BUFFER_POOL_VISUALIZER "Build the BufferPool visualizer" OFF)
option(HERMES_USE_ADDRESS_SANITIZER "Enable -fsanitize=address in Debug builds" ON)
option(HERMES_USE_THREAD_SANITIZER "Enable -fsanitize=thread in Debug builds" OFF)
Expand Down Expand Up @@ -341,6 +342,24 @@ if(HERMES_BUILD_BUFFER_POOL_VISUALIZER AND SDL2_FOUND)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/buffer_pool_visualizer)
endif()

#-----------------------------------------------------------------------------
# Documentation
#-----------------------------------------------------------------------------

if(HERMES_ENABLE_DOXYGEN)
include(UseDoxygenDoc)

add_doxygen_doc(
BUILD_DIR
${CMAKE_CURRENT_BINARY_DIR}/_build
DOXY_FILE
${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
TARGET_NAME
dox
COMMENT
"HTML documentation"
)
endif()

#-----------------------------------------------------------------------------
# Testing
Expand Down
7 changes: 4 additions & 3 deletions deps.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV USER=hermes
RUN useradd -ms /bin/bash $USER
RUN su - $USER -c "touch me"

RUN apt-get update -q && \
RUN apt-get update -q --fix-missing && \
apt-get install -yq gcc g++

RUN apt-get install -y sudo
Expand All @@ -29,7 +29,9 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends
lcov \
zlib1g-dev \
libsdl2-dev \
gfortran
gfortran \
graphviz \
doxygen

USER $USER

Expand All @@ -48,7 +50,6 @@ RUN git clone https://github.com/spack/spack ${SPACK_DIR}
RUN git clone https://xgitlab.cels.anl.gov/sds/sds-repo.git ${SDS_DIR}
RUN git clone https://github.com/HDFGroup/hermes ${PROJECT}


ENV spack=${SPACK_DIR}/bin/spack

RUN . ${SPACK_DIR}/share/spack/setup-env.sh
Expand Down
4 changes: 2 additions & 2 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hdevarajan92/hermes-dep:latest
FROM hdfgroup/hermes-deps:latest

RUN sudo apt-get update -q

Expand All @@ -20,4 +20,4 @@ RUN git clone https://github.com/HDFGroup/hermes ${PROJECT}
RUN sh /home/$USER/.bashrc

RUN mkdir -p $PROJECT/build
WORKDIR $PROJECT/build
WORKDIR $PROJECT/build
Loading

0 comments on commit 8529528

Please sign in to comment.