From 6bc9f09c09defa673bf0562684f9112fa94a9cfc Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Wed, 28 Jul 2021 14:28:25 -0700 Subject: [PATCH] Print link to docs preview (#6922) This commit adds a message to the `docs` target with a link to a preview of the documentation, e.g.: ``` Preview docs in browser: file://localhost/home/noetzli/repos/cvc5_win/build-docs/docs/sphinx/index.html ``` --- docs/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index b20819001..2d8abc8cf 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -37,6 +37,13 @@ add_custom_target( COMMENT "Generating Sphinx Api docs" ) +add_custom_command( + TARGET docs + POST_BUILD + COMMAND + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Preview docs in browser: file://localhost${SPHINX_OUTPUT_DIR}/index.html" +) + set(SPHINX_GH_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/sphinx-gh) add_custom_target( docs-gh ALL -- 2.30.2