Skip to content

Commit

Permalink
Add option to build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ckendrick committed May 6, 2024
1 parent 235adf8 commit 4d42ef4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB} -DENABLE_DOCS=ON
make
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
Expand All @@ -63,7 +63,7 @@ jobs:
cd libROM
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB} -DENABLE_DOCS=ON
make
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ option(USE_MFEM "Build libROM with MFEM" OFF)
option(MFEM_USE_GSLIB "Build libROM with MFEM using GSLIB" OFF)
option(BUILD_STATIC "Build libROM as a static library" OFF)
option(ENABLE_EXAMPLES "Build examples and regression tests" ON)
option(ENABLE_DOCS "Build docs using Doxygen" OFF)

## Set a bunch of variables to generate a configure header
# Enable assertion checking if debug symbols generated
Expand Down Expand Up @@ -108,8 +109,6 @@ find_package(MPI 1.2 REQUIRED)

find_package(ZLIB 1.2.3 REQUIRED)

find_package(Doxygen 1.8.5)

find_package(GTest 1.6.0)

if (USE_MFEM)
Expand Down Expand Up @@ -298,7 +297,9 @@ endif(GTEST_FOUND)
# NOTE(goxberry@gmail.com, oxberry1@llnl.gov): This code snippet
# builds the Doxygen documentation, but outputs said documentation to
# ${CMAKE_CURRENT_SOURCE_DIR}/docs)...
if(DOXYGEN_FOUND)
if(${ENABLE_DOCS})
find_package(Doxygen 1.8.5 REQUIRED)

set(doxyfile ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile)

add_custom_target(
Expand All @@ -317,4 +318,4 @@ if(DOXYGEN_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/docs/html/rom.tag)
add_dependencies(doxygen_tagfile documentation)

endif(DOXYGEN_FOUND)
endif()

0 comments on commit 4d42ef4

Please sign in to comment.