Skip to content

Commit

Permalink
build(docs): add file stamp depends
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Dec 27, 2023
1 parent 76c601b commit 2dd0a13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ if(NOT RES EQUAL 0 )
message(FATAL_ERROR "Failed to install Python dependencies:\n${ERR}")
endif()

get_target_property(errors_docs_BINARY_DIR errors_docs BINARY_DIR)
get_target_property(errors_format_docs_BINARY_DIR errors_format_docs BINARY_DIR)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
COMMAND ${Python_EXECUTABLE} -m sphinx -b html ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/html -W --keep-going
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/conf.py
${CMAKE_CURRENT_SOURCE_DIR}/index.rst
${errors_docs_BINARY_DIR}/errors_docs.stamp
${errors_format_docs_BINARY_DIR}/errors_format_docs.stamp
)

add_custom_target(docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
Expand Down

0 comments on commit 2dd0a13

Please # to comment.