Skip to content

Commit

Permalink
feat: add build option to enable or disable docs targets
Browse files Browse the repository at this point in the history
New option: ASAP_BUILD_DOCS. When ON, doxygen and sphinx targets will be
added and the detection of the required tools is done.
  • Loading branch information
abdes committed Apr 21, 2023
1 parent 4c5ef88 commit 481c240
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ asap_push_project(${META_PROJECT_NAME})
# cmake-format: off
option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON)
option(ASAP_BUILD_TESTS "Setup target to build and run tests." OFF)
option(ASAP_BUILD_EXAMPLES "Setup target to build the examples." OFF)
option(ASAP_BUILD_DOCS "Setup target to build the doxygen and sphinx docs." ON)
option(ASAP_WITH_GOOGLE_ASAN "Instrument code with address sanitizer" OFF)
option(ASAP_WITH_GOOGLE_UBSAN "Instrument code with undefined behavior sanitizer" OFF)
Expand Down Expand Up @@ -146,13 +147,15 @@ configure_file(.clangd.in ${CMAKE_SOURCE_DIR}/.clangd @ONLY)
# Documentation - doxygen, sphinx/breathe/exhale
# ------------------------------------------------------------------------------

# Doxygen
set(DOXYGEN_BUILD_DIR "${CMAKE_BINARY_DIR}/dox")
include(DoxGeneration)
if (ASAP_BUILD_DOCS)
# Doxygen
set(DOXYGEN_BUILD_DIR "${CMAKE_BINARY_DIR}/dox")
include(DoxGeneration)

# Sphinx/breathe/exhale
set(SPHINX_BUILD_DIR "${CMAKE_BINARY_DIR}/sphinx")
include(SphinxGeneration)
# Sphinx/breathe/exhale
set(SPHINX_BUILD_DIR "${CMAKE_BINARY_DIR}/sphinx")
include(SphinxGeneration)
endif()

# ------------------------------------------------------------------------------
# Testing
Expand Down

0 comments on commit 481c240

Please sign in to comment.