Closed claremacrae closed 3 years ago
This SO answer shows how to force a custom command to always run.
I've simplified the CMakeLists.txt files in doc/ considerably, so these should not be a blocker to moving away from .source.md files now.
Another issue to investigate is whether any of the code in doc/sphinx/markdown_conversion.py
needs to be updated.
/Users/clare/Documents/develop/ApprovalTests/ApprovalTests.cpp/doc/sphinx/generated_docs/TroubleshootingMisconfiguredBuild.rst:27: WARNING: Unknown target name: "#force-the-compiler-to-use-full-paths-in-__file_".
I've now merged this to the main branch.
A side-benefit of this work is that it detected that the Sphinx docs had wrongly started containing the mdsnippets-generated tables of contents, due to a case-change in the endtoc
end-marker...
Now, mdsnippets also gets run on the test input file doc/sphinx/tests/test_markdown_conversion_input.md
- meaning that anyone running the sphinx python tests should notice if mdsnippets output is changed in a way that affects the output of doc/sphinx/markdown_conversion.py
See https://github.com/simonCropp/MarkdownSnippets#inplaceoverwrite
This would mean that we would remove the *.source.md files, and put snippets directly in to .md files.
The main thing making this hard at the moment is the complex set of CMake rules I created to generate the to detect dependencies for the targets
RunMdsnippets
,Doxygen
andSphinx
.After removing
.source.md
files, it would no longer be feasible to work out whether the docs needed regenerating, without scanning all the .md files to see if they container any snippets, and then finding those snippets in source code, and seeing if the code had been changed.So it would be easier to just remove all that CMake complexity - and make it so that those docs-specific targets just always run, without checking dependencies.