summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/testRST.rst
Commit message (Collapse)AuthorAgeFilesLines
* Utilities/Sphinx: Add 'cref' roleMatthew Woehlke2023-03-141-1/+6
| | | | | | | | | | | | | Add a role that can be used to create local links (a la '`LINK`_'), but that also applies literal style. This is particularly useful for referring to subcommands within the command's documentation in a style that is consistent with ':command:`BAR <foo(BAR)>`' but is much less verbose. Although this is intended for subcommands, it works with any local reference. Co-authored-by: Brad King <brad.king@kitware.com>
* cmRST: Fix cmake domain directives with newline before argumentBrad King2023-03-091-5/+10
| | | | | | | | | | | | | | The `signature` directive added by commit 74e3c1d313 (Utilities/Sphinx: Add a directive to document command signatures, 2023-02-24) will be commonly used with the form: .. signature:: some_command(SOME_SIGNATURE) Docs for this signature. Drop the assumption that all CMake domain directives are immediately followed by their argument on the same line.
* Utilities/Sphinx: Add a directive to document command signaturesMatthew Woehlke2023-03-031-0/+8
| | | | | | | Add a `signature` directive to offer a CMake version of Sphinx's `function` directive, similar to that found in other domains (py, cpp, etc.). Like others, this takes one or more signatures as arguments and creates dt/dd nodes from the signatures and the directive contents.
* cmRST: support `versionadded` and `versionchanged` directivesBen Boeckel2021-10-271-0/+6
| | | | | | | | This makes `versionadded` and `versionchanged` directives show up in `cmake --help-*` output instead of disappearing (and potentially making empty sections). Fixes: #22808
* Utilities/Sphinx: Add role and directive for 'genex' in CMake domainBrad King2021-01-181-0/+14
| | | | | | | | | | | | | | | | | This enables cross-reference syntax for CMake generator expressions: :genex:`SOME_GENEX` :genex:`$<SOME_GENEX>` :genex:`$<SOME_GENEX:...>` and definition of CMake generator expressions via a directive: .. genex:: SOME_GENEX .. genex:: $<SOME_GENEX> .. genex:: $<SOME_GENEX:...> It also adds generator expressions defined by the directive and by `Help/genex/SOME_GENEX.rst` documents to the index.
* cmRST: Add support for 'envvar' directiveBrad King2021-01-181-0/+8
| | | | | | This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19, v3.12.0-rc1~200^2~1).
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* cmRST: Fix crash on empty markup blockBrad King2019-04-051-0/+4
|
* Help: Add new section for CPack generatorsKyle Edwards2018-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | The documentation for CPack generators previously lived in their respective internal CMake modules. This setup was misleading, because it implied that you should include the modules in your own code, which is not the case. Moving the documentation into a separate section does a better job of hiding the internal modules, which are just an implementation detail. The generator documentation has also been modified to remove any references to the module name. The CPackIFW module is a special exception: since it has user-facing macros, the documentation for these macros has been kept in the module page, while all other documentation related to the IFW generator has been moved into the new section. To make it easier to find the new documentation, the old help pages for the CPack*.cmake modules have not been deleted, but have been replaced with a link to their respective help page in the new documentation section.
* cmRST: Parse inline links and inline literalsBrad King2018-05-071-0/+4
| | | | | Render links as the link text only. Render literals as themselves. This is closer to what the Sphinx text generator does.
* cmRST: Add support for 'envvar' cmake domain roleBrad King2018-05-041-0/+2
| | | | | This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19).
* cmRST: Add support for the note and productionlist directivesBrad King2013-10-301-0/+7
| | | | | | Simply print out the lines as normal paragraph text. Teach the CMakeLib.testRST test to cover this syntax. Update the cmake-developer.7 manual to document support for the directives.
* cmRST: Process literal blocks after paragraphs ending in '::'Brad King2013-10-211-0/+17
| | | | | | | Teach cmRST to recognize non-markup lines ending in '::' followed by a blank line as starting a literal block. Record the whole block as if it were a literal block directive and print it just like a code block. Extend the CMakeLib.testRST test to cover such cases.
* cmRST: Do not process inline markup in code-block literalsBrad King2013-10-211-0/+3
| | | | | | | | Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock method internals into an OutputMarkupLines helper. Pass through it a new "inlineMarkup" parameter and teach OutputLine to understand it. When false, do not process inline markup. Extend the CMakeLib.testRST test to cover the two cases.
* Add class cmRST to do basic reStructuredText processingBrad King2013-10-161-0/+72
Create a cmRST class to perform just enough reStructuredText processing to support display of Help documents in human-readable text format. This will be used to implement --help-* command-line options. Support directives "include", "replace", "parsed-literal", "toctree" (Sphinx), and "cmake-module" (CMake Sphinx Extension to scan .cmake modules). Support inline CMake Sphinx Domain roles to convert cross-references to corresponding title text. Support inline substitutions defined by the "replace" directive, but keep it simple by requiring replacements to be defined before use. Add a CMakeLib "testRST" case to cover processing of supported constructs and compare results against expected output.