Print link to docs preview (#6922)
authorAndres Noetzli <andres.noetzli@gmail.com>
Wed, 28 Jul 2021 21:28:25 +0000 (14:28 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Jul 2021 21:28:25 +0000 (21:28 +0000)
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

index b20819001ccb1cbb2ce2a883954bc531319c1c7d..2d8abc8cfaac9bbbabbafaec420f229f97507498 100644 (file)
@@ -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