Skip to content

Commit

Permalink
Introduce Sphinx based documentation for NaluWindUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
sayerhs committed Sep 5, 2017
1 parent 9ec9710 commit 852abd7
Show file tree
Hide file tree
Showing 19 changed files with 3,800 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ build/*

doc/doxygen/html/*
doc/doxygen/latex/*
doc/manual/build/

.DS_Store
.DS_Store
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
set(CMAKE_PREFIX_PATH ${Trilinos_DIR} ${CMAKE_PREFIX_PATH})

option(ENABLE_WRFTONALU "Enable WRF to Nalu Fortran conversion utility" off)
option(ENABLE_SPHINX_DOCS "Enable Sphinx-based user/developer manual" off)
option(ENABLE_DOXYGEN_DOCS "Enable API documentation using Doxygen" off)

find_package(MPI REQUIRED)
find_package(Trilinos REQUIRED)
Expand All @@ -39,6 +41,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)

add_subdirectory(src)

if (ENABLE_SPHINX_DOCS OR ENABLE_DOXYGEN_DOCS)
add_subdirectory(doc)
endif()

# Install library dependency information
install(EXPORT ${CMAKE_PROJECT_NAME}Libraries
DESTINATION lib/cmake/${CMAKE_PROJECT_NAME}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Nalu Wind Energy Utilities

This repository contains various pre- and post-processing utilities to be used
Expand Down
10 changes: 10 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

add_custom_target(docs)

if (ENABLE_SPHINX_DOCS)
add_subdirectory(manual)
endif()

if (ENABLE_DOXYGEN_DOCS)
add_subdirectory(doxygen)
endif()
22 changes: 22 additions & 0 deletions doc/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

if (CMAKE_VERSION LESS "3.9")
find_package(Doxygen REQUIRED)

if (DOXYGEN_FOUND_DOT)
set(DOXYGEN_HAVE_DOT "YES"
CACHE STRING "Flag indicating whether Graphviz is installed")
else()
set(DOXYGEN_HAVE_DOT "NO"
CACHE STRING "Flag indicating whether Graphviz is installed")
endif()
else()
cmake_policy(SET CMP0057 NEW)
find_package(Doxygen
OPTIONAL_COMPONENTS dot)
endif()

configure_file(Doxyfile.in Doxyfile @ONLY)
add_custom_target(api-docs
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")

add_dependencies(docs api-docs)

0 comments on commit 852abd7

Please sign in to comment.