aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-10-13 14:03:31 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-10-13 23:10:35 +0000
commit74747c4d2ffef25c20d950525aa316bb5e2a0700 (patch)
treedf58371afaa4f553fa838d6df996c2588707aaa8 /cmake/modules
parent1e18f793739f4185423cf20b759c2d6e974484b9 (diff)
CMake: Try to make our man page builds faster.
Depend on our generator targets instead of the generated files, which allows parallel builds outside of Ninja. Don't reserve JRE memory when building HTML and man page targets. This reduces the "docs" target build time on my Windows VM here from over two minutes to under one.
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindAsciidoctor.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake
index 3876d04754..b21eac2361 100644
--- a/cmake/modules/FindAsciidoctor.cmake
+++ b/cmake/modules/FindAsciidoctor.cmake
@@ -50,6 +50,12 @@ if(ASCIIDOCTOR_EXECUTABLE)
)
set(_asciidoctor_common_command
+ ${CMAKE_COMMAND} -E env TZ=UTC
+ ${ASCIIDOCTOR_EXECUTABLE}
+ ${_asciidoctor_common_args}
+ )
+
+ set(_asciidoctor_docbook_common_command
${CMAKE_COMMAND} -E env TZ=UTC ASCIIDOCTORJ_OPTS=${_asciidoctorj_opts}
${ASCIIDOCTOR_EXECUTABLE}
${_asciidoctor_common_args}
@@ -62,7 +68,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
add_custom_command(
OUTPUT
${_output_xml}
- COMMAND ${_asciidoctor_common_command}
+ COMMAND ${_asciidoctor_docbook_common_command}
--backend docbook
--out-file ${_output_xml}
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
@@ -112,12 +118,12 @@ if(ASCIIDOCTOR_EXECUTABLE)
set( _output_txt ${_source_base_name}.txt )
ADD_CUSTOM_COMMAND(
- OUTPUT
+ OUTPUT
${_output_txt}
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
${_output_html}
> ${_output_txt}
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
${_output_html}
${ARGN}