Skip to content

Commit

Permalink
Add an option to disable docs when building (#144)
Browse files Browse the repository at this point in the history
Currently we rebuild documentation on every build. 
This adds an option to disable this (default is enabled). 
This is helpful for development environments with repeated builds.

It can be set via colcon's cmake-args:
colcon build --cmake-args -DBUILD_DOCS=OFF

Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Jan 12, 2021
1 parent 0253110 commit 522e7d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/IgnCreateDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ function(ign_create_docs)
set(oneValueArgs API_MAINPAGE_MD AUTOGENERATED_DOC TUTORIALS_MAINPAGE_MD)
set(multiValueArgs "TAGFILES" "ADDITIONAL_INPUT_DIRS")

option(BUILD_DOCS "Build docs" ON)
if (NOT ${BUILD_DOCS})
message(STATUS "Building Documentation disabled via BUILD_DOCS=OFF")
return()
endif()

#------------------------------------
# Parse the arguments
_ign_cmake_parse_arguments(ign_create_docs "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand Down

0 comments on commit 522e7d4

Please sign in to comment.